|
From: | Éloi Rivard |
Subject: | Re: [Denemo-devel] Messages in console |
Date: | Mon, 16 Dec 2013 00:32:27 +0100 |
If all of this is OK for you, I will write some documentation on the website.g_print function should be avoided as much as possible- Error : Dramatic error, kills the program.- Critical : Not dramatic stuff, it should not kill the program, but it should make tests fail (e.g. invalid scheme function use)- Warning : Unwanted but not dramatic stuff (e.g. "could not load foobar.denemo")- Message : Regular messages, interesting for users (e.g. "Portmidi initialized")- Info : Information usually uninteresting for users, but may help the user to report a bug. You need to use --verbose to see info messages.- Debug : Information useful to developers. You should compile with -DDEBUG and use --verbose to see debug messages.There is several log level (Debug, Info, Message, Warning, Critical and Error). You can print a message using glib functions g_debug, g_info, g_message etc and scheme functions d-Debug, d-Info, d-Message etc. The carriage return is automatic so you should not end messages with "\n". For example use g_warning("foobar"); Colors allow you to focus on interesting information.Hi,I have improved the way Denemo prints messages in the console. Now there is a bit of color, and every log level has its meaning:
There is two new options you can pass to the program: --verbose and --silent. The first one enables every messages, and the second one disables them all.Here is what I think about log levels should mean, let me know if you disagree :
[Prev in Thread] | Current Thread | [Next in Thread] |