POSIX: Improved logging
The warnx and warn calls map to PX4_WARN.
Calls to errx or err genrtate a compile error.
The px4_log.h file implements a new log format:
For DEBUG and INFO:
<level> <msg>
For ERROR and WARN:
<level> <msg> (file filepath line linenum)
The verbosity can be changed by setting the macro to use
either linux_log or linux_log_verbose in px4_log.h
Signed-off-by:
Mark Charlebois <charlebm@gmail.com>
Showing
- src/drivers/device/device_posix.cpp 1 addition, 1 deletionsrc/drivers/device/device_posix.cpp
- src/drivers/device/sim.cpp 4 additions, 4 deletionssrc/drivers/device/sim.cpp
- src/drivers/device/vdev.cpp 33 additions, 24 deletionssrc/drivers/device/vdev.cpp
- src/drivers/device/vdev_posix.cpp 10 additions, 10 deletionssrc/drivers/device/vdev_posix.cpp
- src/drivers/led/led.cpp 1 addition, 1 deletionsrc/drivers/led/led.cpp
- src/modules/simulator/simulator.cpp 7 additions, 7 deletionssrc/modules/simulator/simulator.cpp
- src/modules/simulator/simulator_mavlink.cpp 2 additions, 2 deletionssrc/modules/simulator/simulator_mavlink.cpp
- src/modules/systemlib/err.h 10 additions, 0 deletionssrc/modules/systemlib/err.h
- src/modules/systemlib/module.mk 3 additions, 2 deletionssrc/modules/systemlib/module.mk
- src/platforms/posix/drivers/accelsim/accelsim.cpp 1 addition, 1 deletionsrc/platforms/posix/drivers/accelsim/accelsim.cpp
- src/platforms/posix/drivers/barosim/baro.cpp 40 additions, 41 deletionssrc/platforms/posix/drivers/barosim/baro.cpp
- src/platforms/posix/drivers/barosim/baro_sim.cpp 3 additions, 3 deletionssrc/platforms/posix/drivers/barosim/baro_sim.cpp
- src/platforms/posix/drivers/gyrosim/gyrosim.cpp 2 additions, 2 deletionssrc/platforms/posix/drivers/gyrosim/gyrosim.cpp
- src/platforms/posix/drivers/tonealrmsim/tone_alarm.cpp 1 addition, 1 deletionsrc/platforms/posix/drivers/tonealrmsim/tone_alarm.cpp
- src/platforms/posix/px4_layer/px4_posix_tasks.cpp 19 additions, 4 deletionssrc/platforms/posix/px4_layer/px4_posix_tasks.cpp
- src/platforms/px4_log.h 19 additions, 12 deletionssrc/platforms/px4_log.h
- src/platforms/qurt/px4_layer/px4_qurt_tasks.cpp 1 addition, 1 deletionsrc/platforms/qurt/px4_layer/px4_qurt_tasks.cpp
Loading
Please register or sign in to comment