diff --git a/voltha/main.py b/voltha/main.py
index 7c2aacf..9f03cf0 100755
--- a/voltha/main.py
+++ b/voltha/main.py
@@ -18,6 +18,9 @@
 """Virtual OLT Hardware Abstraction main entry point"""
 
 import argparse
+import os
+
+import yaml
 
 from structlog_setup import setup_logging, DEFAULT_FLUENT_SERVER
 
@@ -26,19 +29,15 @@
 
     parser = argparse.ArgumentParser()
 
+    # generic parameters
     parser.add_argument('--no-banner', dest='no_banner', action='store_true', default=False,
                         help='omit startup banner log lines')
     parser.add_argument('-v', '--verbose', dest='verbose', action='store_true', default=False,
                         help='enable verbose logging')
     parser.add_argument('-q', '--quiet', dest='quiet', action='store_true', default=False,
                         help="suppress debug and info logs")
-
-    # fluentd logging related options
-    parser.add_argument('--enable-fluent', dest='enable_fluent', action='store_true', default=False,
-                        help='enable log stream emission to fluent(d) agent')
-    parser.add_argument('--fluent-server', dest='fluent_server', action='store', default=DEFAULT_FLUENT_SERVER,
-                        # variable='<fluent-host>:<fluent-port>',
-                        help="<fluent-host>:<fluent-port>: host name (or ip address) and tcp port of fluent agent")
+    parser.add_argument('-c', '--config', dest='config', action='store', default='./voltha.yml',
+                        help='Path to voltha.yml config file. If relative, it is relative to main.py of voltha')
 
     # placeholder
     parser.add_argument('-i', '--interface', dest='interface', action='store', default='eth0',
@@ -47,6 +46,17 @@
     return parser.parse_args()
 
 
+def load_config(args):
+    path = args.config
+    if path.startswith('.'):
+        dir = os.path.dirname(os.path.abspath(__file__))
+        path = os.path.join(dir, path)
+    path = os.path.abspath(path)
+    with open(path) as fd:
+        config = yaml.load(fd)
+    return config
+
+
 def print_banner(args, log):
     log.info(' _    ______  __  ________  _____ ')
     log.info('| |  / / __ \/ / /_  __/ / / /   |')
@@ -70,7 +80,8 @@
 
 def main():
     args = parse_args()
-    log = setup_logging(args)
+    config = load_config(args)
+    log = setup_logging(config.get('logging', {}))
     if not args.no_banner:
         print_banner(args, log)
     start_reactor(args, log)  # will not return except Keyboard interrupt
diff --git a/voltha/structlog_setup.py b/voltha/structlog_setup.py
index 01fa973..2382c0e 100644
--- a/voltha/structlog_setup.py
+++ b/voltha/structlog_setup.py
@@ -21,8 +21,7 @@
 from collections import OrderedDict
 
 import structlog
-import sys
-import yaml
+from structlog.stdlib import BoundLogger
 
 try:
     from thread import get_ident as _get_ident
@@ -61,44 +60,7 @@
             del _repr_running[call_key]
 
 
-def setup_fluent_logging(args):
-    """Setup structlog pipeline and hook it into the fluent sender"""
-
-    # Configure standard logging
-    with open('logging.yaml') as fd:
-        conf = yaml.load(fd)
-    logging.config.dictConfig(conf['logging'])
-
-    processors = [
-        structlog.processors.StackInfoRenderer(),
-        structlog.processors.format_exc_info,
-        FluentRenderer(),
-    ]
-    structlog.configure(logger_factory=structlog.stdlib.LoggerFactory(),
-                        context_class=PlainRenderedOrderedDict,
-                        processors=processors)
-
-
-def setup_standard_logging(args):
-    """Setup structlog pipeline and hook it into the standard logging framework of Python"""
-
-    # Configure standard logging
-    DATEFMT = '%Y%m%dT%H%M%S'
-    FORMAT = '%(asctime)-11s.%(msecs)03d %(levelname)-8s %(msg)s'
-    level = logging.DEBUG if args.verbose else (logging.WARN if args.quiet else logging.INFO)
-    logging.basicConfig(stream=sys.stdout, level=level, format=FORMAT, datefmt=DATEFMT)
-
-    # Hook up structlog to standard logging
-    processors = [
-        structlog.processors.StackInfoRenderer(),
-        structlog.processors.format_exc_info,
-        structlog.processors.KeyValueRenderer(),  # structlog.processorsJSONRenderer(),
-
-    ]
-    structlog.configure(logger_factory=structlog.stdlib.LoggerFactory(), processors=processors)
-
-
-def setup_logging(args):
+def setup_logging(log_config):
     """
     Set up logging such that:
     - The primary logging entry method is structlog (see http://structlog.readthedocs.io/en/stable/index.html)
@@ -107,10 +69,24 @@
       bridge to a fluent logging agent.
     """
 
-    if args.enable_fluent:
-        setup_fluent_logging(args)
-    else:
-        setup_standard_logging(args)
+    def add_exc_info_flag_for_exception(logger, name, event_dict):
+        if name == 'exception':
+            event_dict['exc_info'] = True
+        return event_dict
+
+    # Configure standard logging
+    logging.config.dictConfig(log_config)
+
+    processors = [
+        add_exc_info_flag_for_exception,
+        structlog.processors.StackInfoRenderer(),
+        structlog.processors.format_exc_info,
+        FluentRenderer(),
+    ]
+    structlog.configure(logger_factory=structlog.stdlib.LoggerFactory(),
+                        context_class=PlainRenderedOrderedDict,
+                        wrapper_class=BoundLogger,
+                        processors=processors)
 
     # Mark first line of log
     log = structlog.get_logger()
diff --git a/logging.yaml b/voltha/voltha.yml
similarity index 100%
rename from logging.yaml
rename to voltha/voltha.yml
