X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fhtsn.git;a=blobdiff_plain;f=src%2FMain.hs;h=ece44a8b9fb53a6e8d27a9e0eef828205185d255;hp=2b0b5b920db4acefd161c2c069ec127695f6483d;hb=da61a6744550e974688d46b23b11f1a842e4da2e;hpb=7de80b4fdfc8e4cef9144570be926fd02706fd2d diff --git a/src/Main.hs b/src/Main.hs index 2b0b5b9..ece44a8 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -37,61 +37,20 @@ import ExitCodes ( exit_no_password, exit_no_username, exit_pidfile_exists ) -import Logging ( - init_logging, - log_debug, - log_error, - log_info, - log_warning ) +import FeedHosts ( FeedHosts(..) ) +import Logging ( init_logging ) import qualified OptionalConfiguration as OC ( OptionalConfiguration(..), from_rc ) -import Terminal ( - display_debug, - display_error, - display_info, - display_sent, - display_warning ) -import TSN.FeedHosts ( FeedHosts(..) ) -import TSN.Xml ( parse_xmlfid ) +import Report ( + report_debug, + report_info, + report_warning, + report_error ) +import Terminal ( display_sent ) +import Xml ( parse_xmlfid ) import Unix ( full_daemonize ) --- | Display and log debug information. WARNING! This does not --- automatically append a newline. The output is displayed/logged --- as-is, for, you know, debug purposes. -report_debug :: String -> IO () -report_debug s = do - display_debug s - log_debug s - - --- | Display and log an error condition. This will prefix the error --- with "ERROR: " when displaying (but not logging) it so that it --- stands out. --- -report_error :: String -> IO () -report_error s = do - display_error $ "ERROR: " ++ s - log_error s - - --- | Display and log an informational (status) message. --- -report_info :: String -> IO () -report_info s = do - display_info s - log_info s - - --- | Display and log a warning. This will prefix the warning with --- "WARNING: " when displaying (but not logging) it so that it --- stands out. --- -report_warning :: String -> IO () -report_warning s = do - display_warning $ "WARNING: " ++ s - log_warning s - -- | Receive a single line of text from a Handle, and send it to the -- debug log.