Severity level
This commit is contained in:
@@ -40,9 +40,9 @@ data Bus = Bus
|
||||
, busLogEnv :: LogEnv
|
||||
}
|
||||
|
||||
withBus :: (Bus -> IO a) -> IO a
|
||||
withBus callback = do
|
||||
handleScribe <- mkHandleScribe ColorIfTerminal stdout (permitItem DebugS) V2
|
||||
withBus :: Severity -> (Bus -> IO a) -> IO a
|
||||
withBus severity callback = do
|
||||
handleScribe <- mkHandleScribe ColorIfTerminal stdout (permitItem severity) V2
|
||||
let makeLogEnv = registerScribe "stdout" handleScribe defaultScribeSettings =<< initLogEnv "hass-controller" "production"
|
||||
-- closeScribes will stop accepting new logs, flush existing ones and clean up resources
|
||||
bracket makeLogEnv closeScribes $ \le -> do
|
||||
|
||||
Reference in New Issue
Block a user