Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 49000f3

Browse files
committed
[CBR-275] default severity is 'Debug'
Signed-off-by: Alexander Diemand <[email protected]>
1 parent 043d186 commit 49000f3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/src/Pos/Launcher/Resource.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ import Pos.Launcher.Param (BaseParams (..), LoggingParams (..),
6666
NodeParams (..))
6767
import Pos.Util (bracketWithLogging, newInitFuture)
6868
import Pos.Util.Log.LoggerConfig (defaultInteractiveConfiguration)
69-
import Pos.Util.Wlog (LoggerConfig (..), Severity (Info), WithLogger,
69+
import Pos.Util.Wlog (LoggerConfig (..), Severity (Debug), WithLogger,
7070
logDebug, logInfo, parseLoggerConfig, removeAllHandlers,
7171
setupLogging)
7272

@@ -243,7 +243,7 @@ getRealLoggerConfig LoggingParams{..} = do
243243
overrideConsoleLog :: LoggerConfig -> LoggerConfig
244244
overrideConsoleLog = case lpConsoleLog of
245245
Nothing -> identity
246-
Just True -> (<>) (defaultInteractiveConfiguration Info)
246+
Just True -> (<>) (defaultInteractiveConfiguration Debug)
247247
-- add output to the console with severity filter >= Info
248248
Just False -> identity
249249

util/src/Pos/Util/Log/LoggerConfig.hs

+5-5
Original file line numberDiff line numberDiff line change
@@ -143,21 +143,21 @@ instance FromJSON LoggerTree where
143143
_lhBackend = StdoutBE,
144144
_lhFpath = Nothing,
145145
_lhSecurityLevel = Just PublicLogLevel,
146-
_lhMinSeverity = Just Info }
146+
_lhMinSeverity = Just Debug }
147147
let fileHandlers =
148148
map (\fp ->
149149
let name = T.pack fp in
150150
LogHandler { _lhName=name
151151
, _lhFpath=Just fp
152152
, _lhBackend=FileTextBE
153-
, _lhMinSeverity=Just Info
153+
, _lhMinSeverity=Just Debug
154154
, _lhSecurityLevel=case ".pub" `T.isSuffixOf` name of
155155
True -> Just PublicLogLevel
156156
_ -> Just SecretLogLevel
157157
}) $
158158
maybeToList singleFile ++ manyFiles
159159
let _ltHandlers = fileHandlers <> handlers <> [consoleHandler]
160-
(_ltMinSeverity :: Severity) <- o .: "severity" .!= Info
160+
(_ltMinSeverity :: Severity) <- o .: "severity" .!= Debug
161161
-- everything else is considered a severity filter
162162
(_ltNamedSeverity :: NamedSeverity) <- for (filterKnowns o) parseJSON
163163
return LoggerTree{..}
@@ -180,10 +180,10 @@ instance Semigroup LoggerTree where
180180
, _ltNamedSeverity = _ltNamedSeverity lt1 <> _ltNamedSeverity lt2
181181
}
182182
instance Monoid LoggerTree where
183-
mempty = LoggerTree { _ltMinSeverity = Info
183+
mempty = LoggerTree { _ltMinSeverity = Debug
184184
, _ltHandlers = [LogHandler { _lhName="console", _lhFpath=Nothing
185185
, _lhBackend=StdoutBE
186-
, _lhMinSeverity=Just Info
186+
, _lhMinSeverity=Just Debug
187187
, _lhSecurityLevel=Just PublicLogLevel}]
188188
, _ltNamedSeverity = HM.empty
189189
}

0 commit comments

Comments
 (0)