Use callback for printing messages
Bug #1412093 reported by
ZyX
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvterm |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Currently libvterm unconditionally prints various messages to stderr, meaning that the only way to silence unneeded messages is closing stderr. I think it would be more useful to use callback function for this with a signature `void (*log)(MessageType type, const char *format, ...)` with the default callback that will print to stderr like it is currently done. This way callers that need this will be able to silence messages completely, redirect them to other file or to syslog, and do this selectively for different messages.
To post a comment you must log in.
These are all #ifdef-guarded now.