Skip to content

Commit

Permalink
Disable logging
Browse files Browse the repository at this point in the history
Without logging, I don't get a stack overflow when running
`scripts/mainnet.sh` for over 5 minutes.
  • Loading branch information
mrBliss committed Dec 9, 2019
1 parent 3c7387d commit 3406ffe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
7 changes: 3 additions & 4 deletions cardano-node/app/cardano-node.hs
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,16 @@ initializeAllFeatures
initializeAllFeatures nCli@NodeCLI { configFp = ncFp }
cardanoEnvironment = do

(loggingLayer, loggingFeature) <- createLoggingFeature cardanoEnvironment nCli
-- (loggingLayer, loggingFeature) <- createLoggingFeature cardanoEnvironment nCli

nodeConfig <- parseNodeConfiguration $ unConfigPath ncFp
(nodeLayer , nodeFeature) <-
createNodeFeature
loggingLayer
(panic "loggingLayer")
cardanoEnvironment
nodeConfig
nCli

pure ([ loggingFeature
, nodeFeature
pure ([ nodeFeature
] :: [CardanoFeature]
, nodeLayer)
12 changes: 7 additions & 5 deletions cardano-node/src/Cardano/Node/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@ runNode
-> NodeConfiguration
-> NodeCLI
-> IO ()
runNode loggingLayer nc nCli = do
hn <- hostname
let !trace = setHostname hn $
llAppendName loggingLayer "node" (llBasicTrace loggingLayer)
runNode _loggingLayer nc nCli = do
-- hn <- hostname
-- let !trace = setHostname hn $
-- llAppendName loggingLayer "node" (llBasicTrace loggingLayer)
let trace :: Tracer IO (LogObject Text)
trace = showTracing stdoutTracer
let tracer = contramap pack $ toLogObject trace

traceWith tracer $ "tracing verbosity = " ++
Expand All @@ -111,7 +113,7 @@ runNode loggingLayer nc nCli = do
case ncViewMode nc of
SimpleView -> handleSimpleNode p trace tracers nCli nc
LiveView -> do
#ifdef UNIX
#ifndef UNIX
let c = llConfiguration loggingLayer
-- We run 'handleSimpleNode' as usual and run TUI thread as well.
-- turn off logging to the console, only forward it through a pipe to a central logging process
Expand Down

0 comments on commit 3406ffe

Please sign in to comment.