@item WARN: Only error messages and warnings
@item BASIC_PROGRESS: Warnings, errors and basic progress (success, etc.)
@item PROGRESS: Warnings, errors and full progress messages
-@item INFO: Warnings, errors, progress and more detailed information
+@item INFO: Warnings, errors, progress and more detailed information (default)
@item DEBUG: All messages, including vull debug messages (very verbose!)
@end itemize
@end itemize
There are also Scheme functions to access all of these logging functions from
-scheme. In addition, the Grob class contains some convenience wrappers for
+scheme. In addition, the Grob class contains some convenience wrappers for
even easier access to these functions.
The message and debug functions in @code{warn.hh} also have an optional
argument @code{newline}, which specifies whether the message should always
-start on a new line or continue a previous message.
+start on a new line or continue a previous message.
By default, @code{progress_indication} does NOT start on a new line, but rather
-continue the previous output. All other functions by default start their
-output on a new line.
+continue the previous output. They also do not have a particular input
+position associated, so there are no progress functions in the Input class.
+All other functions by default start their output on a new line.
-@unnumberedsubsec All logging functions at a glance
+The error functions come in three different flavors: fatal error messages,
+programming error messages and normal error messages. Errors written
+by the @code{error ()} function will cause LilyPond to exit immediately,
+errors by @code{Input::error ()} will continue the compilation, but
+return a non-zero return value of the lilypond call (i.e. indicate an
+unsuccessful program execution). All other errors will be printed on the
+console, but not exit LilyPond or indicate an unsuccessful return code.
+Their only differences to a warnings are the displayed text and that
+they will be shown with loglevel @code{ERROR}.
+
+If the Scheme option @code{warning-as-error} is set, any warning will be
+treated as if @code{Input::error} was called.
-Currently, there are no particular message functions for the INFO loglevel,
-so it is basically identical to PROGRESS.
+@unnumberedsubsec All logging functions at a glance
@multitable @columnfractions 0.16 0.42 0.42
@headitem
@tab @code{Input::error (msg)}, @code{Input::programming_error (msg)}
@item WARN
-@tab @code{warning (msg)} @c WARN
-@tab @code{Input::warning (msg)} @c WARN
+@tab @code{warning (msg)}
+@tab @code{Input::warning (msg)}
@item BASIC
@tab @code{successful (msg)}
@tab -
@item PROGRESS
-@tab @code{progress_indication (msg)}, @code{message (msg)}
+@tab @code{progress_indication (msg)}
+@tab -
+
+@item INFO
+@tab @code{@code{message (msg)}
@tab @code{Input::message (msg)}
@item DEBUG
@item PROGRESS
@tab -
+@tab -
+
+@item INFO
+@tab -
@tab @code{(ly:music-message music msg)}
@item DEBUG
@tab -
@item PROGRESS
-@tab (ly:progress msg args), (ly:message msg args)
+@tab @code{(ly:progress msg args)}
+@tab -
+
+@item INFO
+@tab @code{(ly:message msg args)}
@tab @code{(ly:input-message input msg args)}
@item DEBUG
@tab @code{(ly:debug msg args)}
@tab -
-
@end multitable
and print the message only if that's the case
*/
-/* Define the loglevel (default is PROGRESS); for now, PROGRESS=INFO for a
- all relevant output, so be on the safe side and use INFO as default, just
- in case some output is generated with INFO */
+/* Define the loglevel (default is INFO) */
int loglevel = LOGLEVEL_INFO;
bool
set_loglevel (l);
else
{
- non_fatal_error (_f ("unknown log level `%s', using default (PROGRESS)",
+ non_fatal_error (_f ("unknown log level `%s', using default (INFO)",
level));
set_loglevel (LOGLEVEL_INFO);
}
{
_i ("LOGLEVEL"), "loglevel", 'l', _i ("print log messages according to"
" LOGLEVEL. Possible values are:\n"
- "NONE, ERROR, WARNING, BASIC, PROGRESS (default) and DEBUG.")
+ "NONE, ERROR, WARNING, BASIC, PROGRESS, INFO (default) and DEBUG.")
},
{_i ("FILE"), "output", 'o', _i ("write output to FILE (suffix will be added)")},
{0, "relocate", 0, _i ("relocate using directory of lilypond program")},