propellor spin

This commit is contained in:
Joey Hess 2014-05-11 10:19:21 -03:00
parent d23312cb2b
commit 38cedccdf5
Failed to extract signature
1 changed files with 11 additions and 6 deletions

View File

@ -345,7 +345,12 @@ checkDebugMode = go =<< getEnv "PROPELLOR_DEBUG"
<*> pure (simpleLogFormatter "[$time] $msg")
updateGlobalLogger rootLoggerName $
setLevel DEBUG . setHandlers [f]
go _ = noop
go _ = whenM ((==) "root" <$> myUserName) $ do
f <- setFormatter
<$> fileHandler "/usr/local/bin/propellor/log" DEBUG
<*> pure (simpleLogFormatter "[$time] $msg")
updateGlobalLogger rootLoggerName $
setLevel DEBUG . setHandlers [f]
-- Parameters can be passed to both ssh and scp, to enable a ssh connection
-- caching socket.