~ubuntu-branches/ubuntu/intrepid/schroot/intrepid

« back to all changes in this revision

Viewing changes to sbuild/sbuild-log.h

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2006-07-08 18:33:28 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060708183328-rlo4mpldmyoda55q
Tags: 0.99.2-2ubuntu1
* remerge ubuntu changes:
  + debian/control: libpam-dev (>> 0.79-3ubuntu6)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright © 2005-2006  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 2 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, write to the Free Software
 
15
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 
16
 * MA  02111-1307  USA
 
17
 *
 
18
 *********************************************************************/
 
19
 
 
20
#ifndef SBUILD_LOG_H
 
21
#define SBUILD_LOG_H
 
22
 
 
23
#include <ostream>
 
24
 
 
25
namespace sbuild
 
26
{
 
27
 
 
28
  /// Debugging level.
 
29
  enum DebugLevel
 
30
    {
 
31
      DEBUG_NONE = -1,   ///< No debugging.
 
32
      DEBUG_NOTICE = 1,  ///< Notification messages.
 
33
      DEBUG_INFO = 2,    ///< Informational messages.
 
34
      DEBUG_WARNING = 3, ///< Warning messages.
 
35
      DEBUG_CRITICAL = 4 ///< Critical messages.
 
36
    };
 
37
 
 
38
  /**
 
39
   * Log an informational message.
 
40
   *
 
41
   * @returns an ostream.
 
42
   */
 
43
  std::ostream&
 
44
  log_info ();
 
45
 
 
46
  /**
 
47
   * Log a warning message.
 
48
   *
 
49
   * @returns an ostream.
 
50
   */
 
51
  std::ostream&
 
52
  log_warning ();
 
53
 
 
54
  /**
 
55
   * Log an error message.
 
56
   *
 
57
   * @returns an ostream.
 
58
   */
 
59
  std::ostream&
 
60
  log_error ();
 
61
 
 
62
  /**
 
63
   * Log a debug message.
 
64
   *
 
65
   * @param level the debug level of the message being logged.
 
66
   * @returns an ostream.  This will be a valid stream if level is
 
67
   * greater or equal to debug_level, or else a null stream will be
 
68
   * returned, resulting in no output.
 
69
   */
 
70
  std::ostream&
 
71
  log_debug (DebugLevel level);
 
72
 
 
73
  /// The debugging level in use.
 
74
  extern DebugLevel debug_level;
 
75
 
 
76
}
 
77
 
 
78
#endif /* SBUILD_LOG_H */
 
79
 
 
80
/*
 
81
 * Local Variables:
 
82
 * mode:C++
 
83
 * End:
 
84
 */