LazLogger ignores the first Log Group's visibility lazarus / 31-LCL ---------------------------------------------------------------------- Gustavo 'Gus' Carreno · 2021-12-17 03:18 Hey Y'all, According to the wiki, if you set the property ParamForEnabledLogGroups to something, like '--debug-enable', you can use that as a parameter to turn on and off(Use a minus before the name) logging groups. The wiki states that the param can be a comma separated list of logging groups. I've found that LazLogger completely ignores the first item on that comma separated list. So if you have a simple program like this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program LazLoggerCLI; {$mode objfpc}{$H+} uses  LazLogger; var  LOG_INFO,  LOG_WARNING,  LOG_ERROR,  LOG_DEBUG: PLazLoggerLogGroup; begin  // Initializing Log Groups  DebugLogger.ParamForEnabledLogGroups:= '-- debug-enable';  LOG_INFO:=DebugLogger.FindOrRegisterLogGroup('LOG_INFO', True);  LOG_WARNING:=DebugLogger.FindOrRegisterLogGroup('LOG_WARNING', True);  LOG_ERROR:=DebugLogger.FindOrRegisterLogGroup('LOG_ERROR', True);  LOG_DEBUG:=DebugLogger.FindOrRegisterLogGroup('LOG_DEBUG', False);   DebugLn('Starting');  DebugLn('LogName: ', DebugLogger.LogName);  DebugLn('ParamForEnabledLogGroups: ', DebugLogger.ParamForEnabledLogGroups);  DebugLnEnter('Start doing some work');  DebugLn(LOG_INFO, 'LOG_INFO: I''m happy doing work!');  DebugLn(LOG_WARNING, 'LOG_WARNING: I''m happy doing work!');  DebugLn(LOG_ERROR, 'LOG_ERROR: I''m happy doing work!');  DebugLn(LOG_DEBUG, 'LOG_DEBUG: I''m happy doing work!');  DebugLn('DEBUGLN: I''m happy doing work!');  DbgOut('DBGOUT: I''m happy doing work!');  DebugLnExit('Ending doing some work');  DebugLn('Ending');end. If you call it this way: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i $ lazloggercli --debug-enable=LOG_DEBUG the result is: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i StartingLogName: ParamForEnabledLogGroups: --debug-enableStart doing some work  LOG_INFO: I'm happy doing work!  LOG_WARNING: I'm happy doing work!  LOG_ERROR: I'm happy doing work!  DEBUGLN: I'm happy doing work!  DBGOUT: I'm happy doing work!Ending doing some workEnding  But if you add a comma before the name: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i $ lazloggercli --debug-enable=,LOG_DEBUG magically the group is now shown: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i StartingLogName: ParamForEnabledLogGroups: --debug-enableStart doing some work  LOG_INFO: I'm happy doing work!  LOG_WARNING: I'm happy doing work!  LOG_ERROR: I'm happy doing work!  LOG_DEBUG: I'm happy doing work!  DEBUGLN: I'm happy doing work!  DBGOUT: I'm happy doing work!Ending doing some workEnding  Since I'm testing this on Lazarus 20.012, should I report this to the team, or has it been dealt with in laz-main? Cheers, Gus ---------------------------------------------------------------------- Martin_fr · 2021-12-17 09:37 Please report. ---------------------------------------------------------------------- Gustavo 'Gus' Carreno · 2021-12-17 10:33 Hey Martin, Quote from: Martin_fr on December 17, 2021, 10:37:48 amPlease report. Done: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39520 Cheers, Gus