refactor(log): require destination in calls to NewLogger (#15262)

This commit is contained in:
Mark Rushakoff
2023-03-06 19:05:49 +00:00
committed by GitHub
parent e9478df161
commit f151bf627a
40 changed files with 173 additions and 178 deletions
+1 -1
View File
@@ -406,7 +406,7 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) {
logger := log.NewNopLogger()
if cfg.EnableLogging {
logger = log.NewLogger()
logger = log.NewLogger(os.Stdout) // TODO(mr): enable selection of log destination.
}
ctx.Logger = logger
+1 -1
View File
@@ -29,7 +29,7 @@ func SetupSimulation(config simtypes.Config, dirPrefix, dbName string, verbose,
var logger log.Logger
if verbose {
logger = log.NewLogger()
logger = log.NewLogger(os.Stdout) // TODO(mr): enable selection of log destination.
} else {
logger = log.NewNopLogger()
}