]> git.donarmstrong.com Git - lilypond.git/commit
Proper loglevels: cmd-line option --loglevel=NONE/ERROR/WARN/BASIC/PROGRESS/DEBUG
authorReinhold Kainhofer <reinhold@kainhofer.com>
Fri, 29 Jul 2011 17:52:41 +0000 (19:52 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Sun, 14 Aug 2011 12:55:10 +0000 (14:55 +0200)
commit86713eefa608f7dc738420ce0225c2a92c4539b2
tree5d3406c5cbf1fc479702cdeddb1b79de2d7c27b1
parentf8702402e51201a2078672532c02b18a31442818
Proper loglevels: cmd-line option --loglevel=NONE/ERROR/WARN/BASIC/PROGRESS/DEBUG

Allow the user to specify which messages (s)he wants to see on stderr:
The lilypond code basically stays the same, I only added a loglevel
global variable, which is used in the warning/error*/progress*/success
functions (ly:warning, ly:error, etc. in Scheme). If the proper level
is not set for a message, it is not printed.

There are only some larger changes:
-) Global var be_verbose_global replaced by loglevel (in warn.cc, accessor
   is_loglevel(...);  much finer-grained)
-) New functions debug_output, which replaces code like:
   if (be_verbose_global) {
   progress_indication (...)
   }
-) Move all scheme log functions to warn-scheme.cc
-) Add (optional) source location info to warning/error/log messages

All changes were done to warn.cc and to the member of the Input class
(apparently, we have two parallel error-reporting "frameworks" in
lilypond...).

Note for all functions in warn.cc (not for the members of Input):
The debug_output function (and progress_indication and message) have
an optional argument to specify whether the output of the message
should always start on a new line or continue the previous output.

All functions of the Input class now are just a front-end for the functions
in warn.cc

Documentation for this new feature is still missing (both in the AU
as well as in the CG).
28 files changed:
flower/include/warn.hh
flower/warn.cc
input/regression/loglevels.ly [new file with mode: 0644]
lily/all-font-metrics.cc
lily/font-config-scheme.cc
lily/font-config.cc
lily/general-scheme.cc
lily/global-context-scheme.cc
lily/guile-init.cc
lily/includable-lexer.cc
lily/include/input.hh
lily/include/main.hh
lily/input.cc
lily/lexer.ll
lily/lily-guile.cc
lily/main.cc
lily/paper-score.cc
lily/performance.cc
lily/pfb-scheme.cc
lily/program-option-scheme.cc
lily/relocate.cc
lily/system.cc
lily/ttf.cc
lily/warn-scheme.cc [new file with mode: 0644]
scm/backend-library.scm
scm/define-note-names.scm
scm/lily-library.scm
scm/lily.scm