Default logfile can be set to /dev/null on Linux to disable file logging. Supposedly NUL on Windows will work the same way.

This commit is contained in:
2024-07-18 10:58:32 -04:00
parent f7ee1a347e
commit 73f92d0c1a

View File

@@ -24,6 +24,11 @@ int main()
{
LOGLEVEL(jlog::severity::debug); // <- see jlog::severity for full list of log levels
CONSOLELOGGING(true); // <- Set to true or false to enable/disable logging to console. Useful for release builds of a program.
#ifdef _WIN32
jlog::set_default_logfile("NUL")
#else
jlog::set_default_logfile("/dev/null");
#endif
INFO("This is barely useful information.");
DEBUG("Debugging Information");