diff --git a/src/utility/logger.cpp b/src/utility/logger.cpp
new file mode 100644
index 0000000..3d9a804
--- /dev/null
+++ b/src/utility/logger.cpp
@@ -0,0 +1,59 @@
+#include "logger.hpp"
+
+namespace nlsr {
+
+string
+Logger::getEpochTime()
+{
+  std::stringstream ss;
+  boost::posix_time::ptime time_t_epoch(boost::gregorian::date(1970, 1, 1));
+  boost::posix_time::ptime now = boost::posix_time::microsec_clock::local_time();
+  boost::posix_time::time_duration diff = now - time_t_epoch;
+  ss << diff.total_seconds() << "." << boost::format("%06i") %
+     (diff.total_microseconds()
+      % 1000000);
+  return ss.str();
+}
+
+string
+Logger::getUserHomeDirectory()
+{
+  string homeDirPath(getpwuid(getuid())->pw_dir);
+  if (homeDirPath.empty())
+  {
+    homeDirPath = getenv("HOME");
+  }
+  return homeDirPath;
+}
+
+void
+Logger::initialize(std::string dirPath)
+{
+  string logDirPath(dirPath);
+  if (dirPath.empty())
+  {
+    logDirPath = getUserHomeDirectory() + "/nlsrLog";
+  }
+  cout << "Log Dir Path: " << logDirPath << endl;
+  typedef sinks::synchronous_sink<sinks::text_file_backend> file_sink;
+  shared_ptr<file_sink> sink(new file_sink(
+                               keywords::file_name = logDirPath
+                                                     + "/NLSR%Y%m%d%H%M%S_%3N.log",
+                               keywords::rotation_size = 16 * 1024 * 1024,
+                               keywords::time_based_rotation = sinks::file::rotation_at_time_point(12, 0, 0),
+                               keywords::auto_flush = true
+                             ));
+  sink->locked_backend()->set_file_collector(sinks::file::make_collector(
+                                               keywords::target = logDirPath,
+                                               //keywords::max_size =  512 * 1024 * 1024,
+                                               keywords::min_free_space = 64 * 1024 * 1024
+                                             ));
+  sink->set_formatter(
+    expr::format("%1% %2%")
+    % getEpochTime()
+    % expr::smessage
+  );
+  logging::core::get()->add_sink(sink);
+}
+
+}//namespace nlsr
