diff options
author | Joey Hess <joey@kitenet.net> | 2013-01-15 14:09:35 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-01-15 14:09:35 -0400 |
commit | 6dca9e23d3d03539f9f27b0580f5aa9654b6dcec (patch) | |
tree | 1a1160be502d5f7f321bc525b79911d1904b6c40 /Assistant/Alert.hs | |
parent | ef6c4964c5b9c63ee3742a8ca1ebe3ab6515c16b (diff) |
write alerts to log in debug mode
Diffstat (limited to 'Assistant/Alert.hs')
-rw-r--r-- | Assistant/Alert.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Assistant/Alert.hs b/Assistant/Alert.hs index c615b38ef..97f75bae8 100644 --- a/Assistant/Alert.hs +++ b/Assistant/Alert.hs @@ -120,6 +120,12 @@ renderAlertMessage :: Alert -> Text renderAlertMessage alert = renderTense (alertTense alert) $ (alertMessageRender alert) (alertData alert) +showAlert :: Alert -> String +showAlert alert = T.unpack $ T.unwords $ catMaybes + [ renderAlertHeader alert + , Just $ renderAlertMessage alert + ] + alertTense :: Alert -> Tense alertTense alert | alertClass alert == Activity = Present |