samp-log-core icon indicating copy to clipboard operation
samp-log-core copied to clipboard

Print trace only on specific log level

Open Mrucznik opened this issue 5 years ago • 1 comments

It would be cool if we could define, in which log level traces will be printed. For example:

SetLogTraceLevel(logger, ERROR, true);
Log(logger, ERROR, "test"); //would print trace
Log(logger, INFO, "test"); //shouldn't print trace

Mrucznik avatar Jul 01 '19 15:07 Mrucznik

Having a per-logger per-loglevel setting would just clutter the config file, but I could add a global per-loglevel setting for this:

LogLevel: # per loglevel settings
  Error:
    PrintCallTrace: false

maddinat0r avatar Aug 12 '19 09:08 maddinat0r