sbuild  1.6.10
sbuild-log.h
1 /* Copyright © 2005-2007 Roger Leigh <rleigh@debian.org>
2  *
3  * schroot is free software: you can redistribute it and/or modify it
4  * under the terms of the GNU General Public License as published by
5  * the Free Software Foundation, either version 3 of the License, or
6  * (at your option) any later version.
7  *
8  * schroot is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see
15  * <http://www.gnu.org/licenses/>.
16  *
17  *********************************************************************/
18 
19 #ifndef SBUILD_LOG_H
20 #define SBUILD_LOG_H
21 
22 #include <ostream>
23 
24 namespace sbuild
25 {
26 
29  {
30  DEBUG_NONE = -1,
32  DEBUG_INFO = 2,
35  };
36 
42  std::ostream&
43  log_info ();
44 
50  std::ostream&
51  log_warning ();
52 
58  std::ostream&
59  log_error ();
60 
69  std::ostream&
70  log_debug (debug_level level);
71 
77  std::ostream&
78  log_ctty_info ();
79 
85  std::ostream&
87 
93  std::ostream&
94  log_ctty_error ();
95 
101  void
102  log_exception_warning (std::exception const& e);
103 
109  void
110  log_exception_error (std::exception const& e);
111 
117  void
118  log_ctty_exception_warning (std::exception const& e);
119 
125  void
126  log_ctty_exception_error (std::exception const& e);
127 
131  void
133 
136 
137 }
138 
139 #endif /* SBUILD_LOG_H */
140 
141 /*
142  * Local Variables:
143  * mode:C++
144  * End:
145  */
Warning messages.
Definition: sbuild-log.h:33
Debian source builder components.
Definition: sbuild-auth-null.h:24
void log_ctty_exception_warning(std::exception const &e)
Log an exception as a warning to the Controlling TTY.
Definition: sbuild-log.cc:157
debug_level
Debugging level.
Definition: sbuild-log.h:28
Notification messages.
Definition: sbuild-log.h:31
std::ostream & log_ctty_error()
Log an error message to the Controlling TTY.
Definition: sbuild-log.cc:136
std::ostream & log_ctty_warning()
Log a warning message to the Controlling TTY.
Definition: sbuild-log.cc:129
std::ostream & log_debug(debug_level level)
Log a debug message.
Definition: sbuild-log.cc:110
std::ostream & log_ctty_info()
Log an informational message to the Controlling TTY.
Definition: sbuild-log.cc:122
void log_exception_warning(std::exception const &e)
Log an exception as a warning.
Definition: sbuild-log.cc:143
void log_unknown_exception_error()
Log an unknown exception as an error.
Definition: sbuild-log.cc:171
Critical messages.
Definition: sbuild-log.h:34
std::ostream & log_error()
Log an error message.
Definition: sbuild-log.cc:103
debug_level debug_log_level
The debugging level in use.
Definition: sbuild-log.cc:176
std::ostream & log_info()
Log an informational message.
Definition: sbuild-log.cc:89
void log_ctty_exception_error(std::exception const &e)
Log an exception as an error to the Controlling TTY.
Definition: sbuild-log.cc:164
void log_exception_error(std::exception const &e)
Log an exception as an error.
Definition: sbuild-log.cc:150
Informational messages.
Definition: sbuild-log.h:32
No debugging.
Definition: sbuild-log.h:30
std::ostream & log_warning()
Log a warning message.
Definition: sbuild-log.cc:96