net: data reception system, fixed bugs in rtl8139
[quarnos.git] / services / logger.h
blobe8bd6449b4a8ed37b9da32ae74ceea74589bc980
1 /* Quarn OS
3 * Logger
5 * Copyright (C) 2008-2009 Pawel Dziepak
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 /* Abstract interface of loggers. They are an objects that inform user about
24 * situations that happened. They decide if a message is worth showing it on
25 * the main data output (for example screen) or if it is better to save it to
26 * a file. They are the main way for kernel to communicate with the user.
29 #ifndef _LOGGER_H_
30 #define _LOGGER_H_
32 #include "libs/string.h"
34 #include "manes/cds/component.h"
36 namespace services {
37 class logger : public manes::cds::component {
38 public:
39 typedef enum {
40 log_critical,
41 log_failure,
42 log_error,
43 log_warning,
44 log_alert,
45 log_info,
46 log_debug
47 } log_level;
49 virtual void print(const string&, log_level) = 0;
53 #endif