Index: src/unittests/Makefile.am
===================================================================
--- src/unittests/Makefile.am	(revision c4d4dfcf2b2eb619122842838b8a34fed1b278e5)
+++ src/unittests/Makefile.am	(revision 06c7a3b2d6ce79572856fe678ea2a178eb974a6a)
@@ -1,5 +1,5 @@
 INCLUDES = -I$(top_srcdir)/src
 
-noinst_PROGRAMS =  ActOnAllUnitTest AnalysisCorrelationToPointUnitTest AnalysisCorrelationToSurfaceUnitTest AnalysisPairCorrelationUnitTest MemoryAllocatorUnitTest MemoryUsageObserverUnitTest VectorUnitTest
+noinst_PROGRAMS =  ActOnAllUnitTest AnalysisCorrelationToPointUnitTest AnalysisCorrelationToSurfaceUnitTest AnalysisPairCorrelationUnitTest LogUnitTest MemoryAllocatorUnitTest MemoryUsageObserverUnitTest VectorUnitTest
 
 TESTS = ActOnAllUnitTest AnalysisCorrelationToPointUnitTest AnalysisCorrelationToSurfaceUnitTest AnalysisPairCorrelationUnitTest MemoryUsageObserverUnitTest MemoryAllocatorUnitTest VectorUnitTest
@@ -40,2 +40,7 @@
 MemoryUsageObserverUnitTest_LDFLAGS = $(CPPUNIT_LIBS) -ldl
 MemoryUsageObserverUnitTest_LDADD = ../libmolecuilder.a
+
+LogUnitTest_SOURCES = ../errorLogger.cpp ../errorLogger.hpp ../log.cpp ../log.hpp ../logger.cpp ../logger.hpp logunittest.cpp logunittest.hpp
+LogUnitTest_CXXFLAGS = $(CPPUNIT_CFLAGS)
+LogUnitTest_LDFLAGS = $(CPPUNIT_LIBS) -ldl
+LogUnitTest_LDADD = ../libmolecuilder.a
Index: src/unittests/logunittest.cpp
===================================================================
--- src/unittests/logunittest.cpp	(revision 06c7a3b2d6ce79572856fe678ea2a178eb974a6a)
+++ src/unittests/logunittest.cpp	(revision 06c7a3b2d6ce79572856fe678ea2a178eb974a6a)
@@ -0,0 +1,73 @@
+/*
+ * logunittest.cpp
+ */
+
+
+using namespace std;
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+
+#include "logunittest.hpp"
+#include "logger.hpp"
+#include "errorLogger.hpp"
+#include "log.hpp"
+#include "defs.hpp"
+#include "verbose.hpp"
+
+/********************************************** Test classes **************************************/
+
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( LogTest );
+
+
+void LogTest::setUp()
+{
+};
+
+void LogTest::tearDown()
+{
+};
+
+/**
+ * UnitTest for log()
+ */
+void LogTest::logTest()
+{
+  logger::getInstance()->setVerbosity(2);
+  cout << "Verbosity level is set to 2." << endl;
+  log() << Verbose(0) << "Test level 0" << endl;
+  log() << Verbose(1) << "Test level 1" << endl;
+  log() << Verbose(2) << "Test level 2" << endl;
+  log() << Verbose(3) << "Test level 3" << endl;
+  log() << Verbose(4) << "Test level 4" << endl;
+
+  log() << Verbose(0) << "Output a log message." << endl;
+  elog() << Verbose(0) << "Output an error message." << endl;
+  setVerbosity(3);
+  log() << Verbose(4) << "This should not be printed." << endl;
+  elog() << Verbose(4) << "This should not be printed." << endl;
+};
+
+
+/********************************************** Main routine **************************************/
+
+int main(int argc, char **argv)
+{
+  // Get the top level suite from the registry
+  CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
+
+  // Adds the test to the list of test to run
+  CppUnit::TextUi::TestRunner runner;
+  runner.addTest( suite );
+
+  // Change the default outputter to a compiler error format outputter
+  runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(),
+                                                       std::cerr ) );
+  // Run the tests.
+  bool wasSucessful = runner.run();
+
+  // Return error code 1 if the one of test failed.
+  return wasSucessful ? 0 : 1;
+};
Index: src/unittests/logunittest.hpp
===================================================================
--- src/unittests/logunittest.hpp	(revision 06c7a3b2d6ce79572856fe678ea2a178eb974a6a)
+++ src/unittests/logunittest.hpp	(revision 06c7a3b2d6ce79572856fe678ea2a178eb974a6a)
@@ -0,0 +1,26 @@
+/*
+ * logunittest.hpp
+ */
+
+#ifndef LOGTEST_HPP_
+#define LOGTEST_HPP_
+
+#include <cppunit/extensions/HelperMacros.h>
+
+
+/********************************************** Test classes **************************************/
+
+class LogTest : public CppUnit::TestFixture
+{
+    CPPUNIT_TEST_SUITE( LogTest) ;
+    CPPUNIT_TEST ( logTest );
+    CPPUNIT_TEST_SUITE_END();
+
+public:
+    void setUp();
+    void tearDown();
+
+    void logTest();
+};
+
+#endif /* LOGTEST_HPP_ */
