Use callback for printing messages

Bug #1412093 reported by ZyX
6
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.

Revision history for this message
Paul "LeoNerd" Evans (leonerd) wrote :

These are all #ifdef-guarded now.

Changed in libvterm:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.