summaryrefslogtreecommitdiffstats
path: root/src/Common/Backends
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/Backends')
-rw-r--r--src/Common/Backends/ConsoleLogger.cpp33
-rw-r--r--src/Common/Backends/ConsoleLogger.h5
-rw-r--r--src/Common/Backends/FileLogger.cpp32
-rw-r--r--src/Common/Backends/FileLogger.h4
-rw-r--r--src/Common/Backends/Makefile.am2
-rw-r--r--src/Common/Backends/Makefile.in7
6 files changed, 10 insertions, 73 deletions
diff --git a/src/Common/Backends/ConsoleLogger.cpp b/src/Common/Backends/ConsoleLogger.cpp
deleted file mode 100644
index 503bca7..0000000
--- a/src/Common/Backends/ConsoleLogger.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * ConsoleLogger.cpp
- *
- * Copyright (C) 2008 Johannes Thorn <dante@g4t3.de>
- *
- * This program is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "ConsoleLogger.h"
-#include <iostream>
-
-namespace Mad {
-namespace Common {
-namespace Backends {
-
-void ConsoleLogger::logMessage(MessageCategory category, MessageLevel, const std::string &message) {
- std::cerr << message << std::endl;
-}
-
-}
-}
-}
diff --git a/src/Common/Backends/ConsoleLogger.h b/src/Common/Backends/ConsoleLogger.h
index ee0b51e..7ae09a5 100644
--- a/src/Common/Backends/ConsoleLogger.h
+++ b/src/Common/Backends/ConsoleLogger.h
@@ -21,6 +21,7 @@
#define MAD_COMMON_BACKENDS_CONSOLELOGGER_H_
#include "../Logger.h"
+#include <iostream>
namespace Mad {
namespace Common {
@@ -28,7 +29,9 @@ namespace Backends {
class ConsoleLogger : public Logger {
protected:
- virtual void logMessage(MessageCategory category, MessageLevel, const std::string &message);
+ virtual void logMessage(MessageCategory category, MessageLevel, const std::string &message) {
+ std::cerr << message << std::endl;
+ }
public:
ConsoleLogger() {}
diff --git a/src/Common/Backends/FileLogger.cpp b/src/Common/Backends/FileLogger.cpp
deleted file mode 100644
index 8d95da5..0000000
--- a/src/Common/Backends/FileLogger.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * FileLogger.cpp
- *
- * Copyright (C) 2008 Johannes Thorn <dante@g4t3.de>
- *
- * This program is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "FileLogger.h"
-
-namespace Mad {
-namespace Common {
-namespace Backends {
-
-void FileLogger::logMessage(MessageCategory category, MessageLevel, const std::string &message) {
- file << message << std::endl;
-}
-
-}
-}
-}
diff --git a/src/Common/Backends/FileLogger.h b/src/Common/Backends/FileLogger.h
index 3626fed..e31c019 100644
--- a/src/Common/Backends/FileLogger.h
+++ b/src/Common/Backends/FileLogger.h
@@ -32,7 +32,9 @@ class FileLogger : public Logger {
std::ofstream file;
protected:
- virtual void logMessage(MessageCategory category, MessageLevel, const std::string &message);
+ virtual void logMessage(MessageCategory category, MessageLevel, const std::string &message) {
+ file << message << std::endl;
+ }
public:
FileLogger(const std::string &filename)
diff --git a/src/Common/Backends/Makefile.am b/src/Common/Backends/Makefile.am
index 5a6e325..26ec0f0 100644
--- a/src/Common/Backends/Makefile.am
+++ b/src/Common/Backends/Makefile.am
@@ -1,5 +1,5 @@
noinst_LTLIBRARIES = libbackends.la
-libbackends_la_SOURCES = ConsoleLogger.cpp FileLogger.cpp SystemBackendProc.cpp
+libbackends_la_SOURCES = SystemBackendProc.cpp
noinst_HEADERS = ConsoleLogger.h FileLogger.h SystemBackendProc.h
diff --git a/src/Common/Backends/Makefile.in b/src/Common/Backends/Makefile.in
index ad490ee..4a48c24 100644
--- a/src/Common/Backends/Makefile.in
+++ b/src/Common/Backends/Makefile.in
@@ -48,8 +48,7 @@ CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libbackends_la_LIBADD =
-am_libbackends_la_OBJECTS = ConsoleLogger.lo FileLogger.lo \
- SystemBackendProc.lo
+am_libbackends_la_OBJECTS = SystemBackendProc.lo
libbackends_la_OBJECTS = $(am_libbackends_la_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -188,7 +187,7 @@ target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
noinst_LTLIBRARIES = libbackends.la
-libbackends_la_SOURCES = ConsoleLogger.cpp FileLogger.cpp SystemBackendProc.cpp
+libbackends_la_SOURCES = SystemBackendProc.cpp
noinst_HEADERS = ConsoleLogger.h FileLogger.h SystemBackendProc.h
all: all-am
@@ -241,8 +240,6 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ConsoleLogger.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FileLogger.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SystemBackendProc.Plo@am__quote@
.cpp.o: