LEFT | RIGHT |
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 | 5 |
6 LilyPond is free software: you can redistribute it and/or modify | 6 LilyPond is free software: you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
8 the Free Software Foundation, either version 3 of the License, or | 8 the Free Software Foundation, either version 3 of the License, or |
9 (at your option) any later version. | 9 (at your option) any later version. |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 // There is no separation between progress and other info messages: | 31 // There is no separation between progress and other info messages: |
32 #define LOG_INFO 1<<4 | 32 #define LOG_INFO 1<<4 |
33 #define LOG_DEBUG 1<<8 | 33 #define LOG_DEBUG 1<<8 |
34 | 34 |
35 /* Log-level definitions (or'ed bitmasks) */ | 35 /* Log-level definitions (or'ed bitmasks) */ |
36 #define LOGLEVEL_NONE (LOG_NONE) | 36 #define LOGLEVEL_NONE (LOG_NONE) |
37 #define LOGLEVEL_ERROR (LOG_ERROR) | 37 #define LOGLEVEL_ERROR (LOG_ERROR) |
38 #define LOGLEVEL_WARN (LOGLEVEL_ERROR | LOG_WARN) | 38 #define LOGLEVEL_WARN (LOGLEVEL_ERROR | LOG_WARN) |
39 #define LOGLEVEL_BASIC (LOGLEVEL_WARN | LOG_BASIC) | 39 #define LOGLEVEL_BASIC (LOGLEVEL_WARN | LOG_BASIC) |
40 #define LOGLEVEL_PROGRESS (LOGLEVEL_BASIC | LOG_PROGRESS ) | 40 #define LOGLEVEL_PROGRESS (LOGLEVEL_BASIC | LOG_PROGRESS ) |
41 // There is no separation between progress and other info messages: | 41 // There is no separation between progress and other info messages: |
42 #define LOGLEVEL_INFO LOGLEVEL_PROGRESS | 42 #define LOGLEVEL_INFO LOGLEVEL_PROGRESS |
43 #define LOGLEVEL_DEBUG (LOGLEVEL_INFO | LOG_DEBUG) | 43 #define LOGLEVEL_DEBUG (LOGLEVEL_INFO | LOG_DEBUG) |
44 | 44 |
45 /* output messages, in decreasing order of importance */ | 45 /* output messages, in decreasing order of importance */ |
46 void error (string s); // Fatal error, exits lilypond! | 46 void error (string s, string location = ""); // Fatal error, exits lilypond! |
47 void programming_error (string s); | 47 void programming_error (string s, string location = ""); |
48 void non_fatal_error (string); | 48 void non_fatal_error (string, string location = ""); |
49 void warning (string s); | 49 void warning (string s, string location = ""); |
50 void successful (string s); | 50 void successful (string s, string location = ""); |
51 /* progress_indication does by default *NOT* start on a new line */ | 51 /* progress_indication does by default *NOT* start on a new line */ |
52 void progress_indication (string s, bool newline = false); | 52 void progress_indication (string s, bool newline = false, string location = ""); |
53 void message (string s, bool newline = true); | 53 void message (string s, bool newline = true, string location = ""); |
54 void debug_output (string s, bool newline = true); | 54 void debug_output (string s, bool newline = true, string location = ""); |
55 | 55 |
56 /* Helper function that always prints out the message. Callers should ensure | 56 /* Helper functions that always print out the message. Callers should ensure |
57 that the loglevel is obeyed */ | 57 that the loglevel is obeyed */ |
58 void print_message (int level, string s, bool newline = true); | 58 void print_message (int level, string location, string s, bool newline = true); |
59 | 59 |
60 bool is_loglevel (int level); | 60 bool is_loglevel (int level); |
61 void set_loglevel (int level); | 61 void set_loglevel (int level); |
62 void set_loglevel (string level); | 62 void set_loglevel (string level); |
63 | 63 |
64 #endif /* WARN_HH */ | 64 #endif /* WARN_HH */ |
LEFT | RIGHT |