Skip to content

Commit cac378b

Browse files
committed
do_not_merge: Force debug logs
1 parent f5ba572 commit cac378b

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

src/app/boot/app_controller.nim

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,7 @@ proc connect(self: AppController) =
134134
# Handle runtime log level settings changes
135135
if not main_constants.runtimeLogLevelSet():
136136
self.statusFoundation.events.on(node_configuration_service.SIGNAL_NODE_LOG_LEVEL_UPDATE) do(a: Args):
137-
let args = NodeLogLevelUpdatedArgs(a)
138-
if args.logLevel == chronicles.LogLevel.DEBUG:
139-
setLogLevel(chronicles.LogLevel.DEBUG)
140-
elif defined(production):
141-
setLogLevel(chronicles.LogLevel.INFO)
137+
setLogLevel(chronicles.LogLevel.DEBUG)
142138

143139
proc newAppController*(statusFoundation: StatusFoundation): AppController =
144140
result = AppController()

src/app/modules/main/profile_section/advanced/controller.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ proc toggleDebug*(self: Controller) =
7575
if(self.isDebugEnabled()):
7676
logLevel = LogLevel.INFO
7777

78-
if(not self.nodeConfigurationService.setLogLevel(logLevel)):
78+
if(not self.nodeConfigurationService.setLogLevel(LogLevel.DEBUG)):
7979
# in the future we may do a call from here to show a popup about this error
8080
error "an error occurred, we couldn't toggle debug level"
8181
return

src/nim_status_client.nim

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,7 @@ proc prepareLogging() =
8484
let logFile = fmt"app_{formattedDate}.log"
8585
discard output.open(LOGDIR & logFile, fmAppend)
8686

87-
let defaultLogLvl = if defined(production): chronicles.LogLevel.INFO else: chronicles.LogLevel.DEBUG
88-
# default log level can be overriden by LOG_LEVEL env parameter
89-
let logLvl = try: parseEnum[chronicles.LogLevel](main_constants.LOG_LEVEL)
90-
except: defaultLogLvl
91-
92-
setLogLevel(logLvl)
87+
setLogLevel(chronicles.LogLevel.DEBUG)
9388

9489
proc setupRemoteSignalsHandling() =
9590
# Please note that this must use the `cdecl` calling convention because

0 commit comments

Comments
 (0)