irc-fun-bot-0.3.0.0: Library for writing fun IRC bots.

Safe HaskellNone
LanguageHaskell2010

Network.IRC.Fun.Bot.Logger

Synopsis

Documentation

newLogger Source

Arguments

:: IO String

Action which returns a formatted time string. You

-> FilePath

Path of the log file

-> IO Logger 

Create a logger in the IO monad.

newLogger' :: FilePath -> Session e s Logger Source

Create a logger inside the bot session.

removeLogger :: Logger -> IO () Source

Flush buffers and release resources.

When the logger is paused for a long period of time (i.e. not momentarily - e.g. by a user disabling channel logging via UI), you can use this to release resources. Later, when logging is needed again, create a fresh new logger.

logLine :: ToLogStr s => Logger -> s -> IO () Source

Write a log message.