-
Notifications
You must be signed in to change notification settings - Fork 0
Log.cc usage
Gordon Zhang edited this page Jul 14, 2024
·
7 revisions
Welcome to the log.cc wiki!
Note
The basic functions are introduced in README.md
. Here I will tell you more functions defined in Log.cc.
The following examples use l
as the default logger name.
You can use the set_log_level
function.
l.set_log_level(WARNING);
Now only log message which are more important than (or as important as) Warning will me shown.
You can use the disable
function.
Example: l.disable();
To enable the logger again, use the enable
function.
Tip
Sometimes, it's necessary to disable the terminal log output (especially when developing a GUI app, users don't want to see a terminal with plenty of messages).
l.disable_terminal_output();
To enable terminal output again, use the enable_terminal_output
function.
You can view log.cc
and log.h
in the src/
dir.