diff --git a/lib/xos-config/xosconfig/__init__.py b/lib/xos-config/xosconfig/__init__.py
index 105d4a0..a557ff4 100644
--- a/lib/xos-config/xosconfig/__init__.py
+++ b/lib/xos-config/xosconfig/__init__.py
@@ -1,4 +1,3 @@
-
 # Copyright 2017-present Open Networking Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,5 +12,23 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-
 from .config import Config
+
+# Custom TRACE logging level
+# ref: https://stackoverflow.com/questions/2183233/how-to-add-a-custom-loglevel-to-pythons-logging-facility/13638084#13638084
+
+import logging
+
+# Logging levels: https://docs.python.org/2/library/logging.html#logging-levels
+# Add a sub-DEBUG Trace level
+TRACE_LOGLVL = 5
+
+logging.addLevelName(TRACE_LOGLVL, "TRACE")
+
+
+def trace_loglevel(self, message, *args, **kws):
+    if self.isEnabledFor(TRACE_LOGLVL):
+        self._log(TRACE_LOGLVL, message, args, **kws)
+
+
+logging.Logger.trace = trace_loglevel
diff --git a/xos/synchronizers/new_base/event_loop.py b/xos/synchronizers/new_base/event_loop.py
index 4f44cc9..23fb2ab 100644
--- a/xos/synchronizers/new_base/event_loop.py
+++ b/xos/synchronizers/new_base/event_loop.py
@@ -100,10 +100,10 @@
 
         try:
             if Config.get("dependency_graph"):
-                self.log.info('Loading model dependency graph', path=Config.get("dependency_graph"))
+                self.log.trace('Loading model dependency graph', path=Config.get("dependency_graph"))
                 dep_graph_str = open(Config.get("dependency_graph")).read()
             else:
-                self.log.debug('Using defualt model dependency graph', graph={})
+                self.log.trace('Using defualt model dependency graph', graph={})
                 dep_graph_str = '{}'
 
             # joint_dependencies is of the form { Model1 -> [(Model2, src_port, dst_port), ...] }
@@ -132,7 +132,7 @@
                 True: model_dependency_graph_rev,
                 False: model_dependency_graph
             }
-            self.log.info(
+            self.log.trace(
                 "Loaded dependencies",
                 edges=model_dependency_graph.edges())
         except Exception as e:
@@ -442,9 +442,9 @@
             return
 
         while True:
-            self.log.debug('Waiting for event or timeout')
+            self.log.trace('Waiting for event or timeout')
             self.wait_for_event(timeout=5)
-            self.log.debug('Synchronizer awake')
+            self.log.trace('Synchronizer awake')
 
             self.run_once()
 
@@ -483,7 +483,7 @@
                 # This needs to be dropped soon.
                 pending_steps.append(step)
 
-        self.log.debug(
+        self.log.trace(
             'Fetched pending data',
             pending_objects=pending_objects,
             legacy_steps=pending_steps)
@@ -689,7 +689,7 @@
                     objects_to_process, deletion)
 
                 threads = []
-                self.log.debug('In run once inner loop', deletion=deletion)
+                self.log.trace('In run once inner loop', deletion=deletion)
 
                 for cohort in dependent_cohorts:
                     thread = threading.Thread(
diff --git a/xos/synchronizers/new_base/pull_step_engine.py b/xos/synchronizers/new_base/pull_step_engine.py
index 22ab643..0d989a1 100644
--- a/xos/synchronizers/new_base/pull_step_engine.py
+++ b/xos/synchronizers/new_base/pull_step_engine.py
@@ -23,6 +23,7 @@
 
 log = create_logger(Config().get('logging'))
 
+
 class XOSPullStepScheduler():
     """ XOSPullStepThread
 
@@ -39,7 +40,7 @@
             self.run_once()
 
     def run_once(self):
-        log.debug('Starting pull steps', steps=self.steps)
+        log.trace('Starting pull steps', steps=self.steps)
 
         threads = []
         for step in self.steps:
@@ -52,8 +53,7 @@
         for t in threads:
             t.join()
 
-        log.debug('Done with pull steps', steps=self.steps)
-
+        log.trace('Done with pull steps', steps=self.steps)
 
 
 class XOSPullStepEngine:
