LOG: How to check all logs, info, debug, error logs of any module ?
Hi
once can module is up, the logs can be seen in /apollo/data/log/canbus.out but only error logs are being shown, how to check all logs ? Thanks, Srikar
It follows glog. You can set --v=4 to output debug information.
set at run time / Compile time ?
Please set at run time. For example:
/apollo/bazel-bin/modules/planning/planning --flagfile=modules/planning/conf/planning.conf --log_dir=/apollo/data/log --use_navigation_mode --v=4
The log of apollo is defined in /apollo/modules/common/log.h:
#define ADEBUG VLOG(4) << "[DEBUG] "
#define AINFO LOG(INFO)
#define AWARN LOG(WARNING)
#define AERROR LOG(ERROR)
#define AFATAL LOG(FATAL)
... ...
... ...
More information on glog can be found at http://rpg.ifi.uzh.ch/docs/glog.html
Why is apollo not using ROS logging mechanism: http://wiki.ros.org/roscpp/Overview/Logging?
Also are you logging to files during runtime? If yes this then means that you are using system calls such as fopen, fwrite, etc which use blocking threads and which is not safe to use because they make your application hang (and possibly crash).
Normally,if you launch planning module,you could find log in the directory apollo/data/log. It would have planning.INFO,planning.ERROR,etc.if you want to see the DEBUG,you add one line --v=4 into file planning.conf.You canfind DEBUG in the planning.INFO.