Rev 1964 | Details | Compare with Previous | Last modification | View Log | SVN | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1594 | runge | 1 | /* |
| 2 | * |
||
| 3 | * Copyright (C) 2010 Mattias Runge |
||
| 4 | * |
||
| 5 | * This program is free software; you can redistribute it and/or modify |
||
| 6 | * it under the terms of the GNU General Public License as published by |
||
| 7 | * the Free Software Foundation; either version 2 of the License, or |
||
| 8 | * (at your option) any later version. |
||
| 9 | * |
||
| 10 | * This program is distributed in the hope that it will be useful, |
||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
| 13 | * GNU General Public License for more details. |
||
| 14 | * |
||
| 15 | * You should have received a copy of the GNU General Public License along |
||
| 16 | * with this program; if not, write to the Free Software Foundation, Inc., |
||
| 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
||
| 18 | * |
||
| 19 | */ |
||
| 20 | |||
| 21 | #include "Logger.h" |
||
| 22 | |||
| 23 | #include <iostream> |
||
| 1600 | runge | 24 | #include <syslog.h> |
| 25 | #include <boost/date_time.hpp> |
||
| 26 | |||
| 1964 | runge | 27 | #include "common/log.h" |
| 28 | |||
| 1594 | runge | 29 | namespace atom { |
| 30 | namespace logging { |
||
| 31 | |||
| 32 | Logger::Logger(std::string name) |
||
| 33 | { |
||
| 1964 | runge | 34 | this->name_ = name; |
| 35 | this->name_.insert(this->name_.end(), 25 - this->name_.size(), ' '); |
||
| 1594 | runge | 36 | } |
| 37 | |||
| 38 | Logger::~Logger() |
||
| 39 | { |
||
| 40 | } |
||
| 41 | |||
| 42 | void Logger::Error(std::string message) |
||
| 43 | { |
||
| 1964 | runge | 44 | log::Error(this->name_, message.c_str()); |
| 1594 | runge | 45 | } |
| 46 | |||
| 47 | void Logger::Warning(std::string message) |
||
| 48 | { |
||
| 1964 | runge | 49 | log::Warning(this->name_, message.c_str()); |
| 1594 | runge | 50 | } |
| 51 | |||
| 52 | void Logger::Info(std::string message) |
||
| 53 | { |
||
| 1964 | runge | 54 | log::Info(this->name_, message.c_str()); |
| 1594 | runge | 55 | } |
| 56 | |||
| 57 | void Logger::Debug(std::string message) |
||
| 58 | { |
||
| 1964 | runge | 59 | log::Debug(this->name_, message.c_str()); |
| 1594 | runge | 60 | } |
| 61 | |||
| 2066 | runge | 62 | void Logger::Extreme(std::string message) |
| 63 | { |
||
| 64 | log::Extreme(this->name_, message.c_str()); |
||
| 65 | } |
||
| 66 | |||
| 1594 | runge | 67 | }; // namespace logging |
| 68 | }; // namespace atom |