maddinat0r / samp-log-core

Core library for logging utility
MIT License
20 stars 6 forks source link

Print trace only on specific log level #16

Open Mrucznik opened 5 years ago

Mrucznik commented 5 years ago

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
maddinat0r commented 5 years ago

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