mqtt-hs-0.2.0: A MQTT client library.

CopyrightLukas Braun 2014
LicenseGPL-3
Maintainerkoomi+mqtt@hackerspace-bamberg.de
Safe HaskellSafe-Inferred
LanguageHaskell2010

Network.MQTT.Logger

Description

A simple logger abstraction.

Synopsis

Documentation

data Logger Source

Absract logger with three levels of importance.

Constructors

Logger 

Fields

logInfo :: String -> IO ()
 
logWarning :: String -> IO ()
 
logError :: String -> IO ()
 

stdLogger :: Logger Source

logInfo prints to stdout, logWarning and logError to stderr (with [Warning]/[Error] prefix)

warnings :: Logger -> Logger Source

Log only warnings and errors, ignoring anything passed to logInfo.

errors :: Logger -> Logger Source

Like warnings, but logs only errors.

ignore :: String -> IO () Source

Ignore the message.