I'm want to use google-glog (logging library) in my C++\Linux project. And one of the most important feature for me, it's rolling files. I.e. when log file size become more than fixed threshold, creates new log file and old was removed. Same for time limit (daily, hourly etc).
Maybe I missed something, but I can't find such functionality in this very good library. Can somebody help me with this problem?
For logfile size(Integer):
GLOG_max_log_size
(Environmental variable) OR --max_log_size=size
(if gflags is installed) OR fLI::FLAGS_max_log_size=size
(in C++ code)
For logdir(Strings):
GLOG_log_dir
(Environmental variable) OR --log_dir=dir
(if gflags is installed) OR fLS::FLAGS_log_dir=logdir
(in C++ code)
For logging to stderr(Boolean):
GLOG_logtostderr
(Environmental variable) OR --logtostderr=1
(if gflags is installed) OR fLB::logtostderr=true
(in C++ code)
Likewise you can use following also:
fLB
(all are Boolean)fLI
(all are Integers)fLS
(all are Strings)But above all do have a look on to glog_srource/src/logging.cc for more information as quamrana said.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With