Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[debug] Optionally include file/line/function info when logging to st…
…derr When debugging usb-moded it is time consuming to find where the various debug messages originate from. When logging to stderr, prefix the messages with source code position info similar as gcc uses for reporting compilation issues. This allows browsing usb-moded code with jump to the next error functionality available in many text editors. Since the amount of information passed to logging functions is significantly increased, check whether the message would be emitted or not before evaluating formatting parameters etc. Also make variables relating to logging level, type, etc available only via accessor functions. Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
- Loading branch information
Showing
3 changed files
with
135 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters