<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,2 +1,3 @@
 *.pyc
 *.swp
+lightmon.log</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -5,6 +5,7 @@ reports back to the server.
 &quot;&quot;&quot;
 
 import bisect
+import logging
 import sched
 import threading
 import time
@@ -17,6 +18,8 @@ class Client(object):
     The main client class. Here we handle the time scheduled events
     (included the lightmon process itself)
     &quot;&quot;&quot;
+    logger = logging.getLogger(__name__)
+
     def __init__(self, timefunc=time.time, delayfunc=time.sleep):
         # schedule the lightmon controller process as every ``SELF_CHECK_EVERY``
         self.scheduler = sched.scheduler(timefunc, delayfunc)
@@ -34,7 +37,7 @@ class Client(object):
         &quot;&quot;&quot;
         # reschedule ourselves every SELF_CHECK_EVERY seconds
         # self.checkJobs()
-        print &quot;not yet: controller&quot;
+        self.logger.debug(&quot;not yet: controller&quot;)
         self.scheduler.enter(config.SELF_CHECK_EVERY, 1, self.controller, ())
 
     def checkJobs(self):
@@ -73,7 +76,7 @@ class Client(object):
             return
             
         # TODO: run the real job
-        print &quot;[run %s/%d]&quot; % (self.jobs[jobnum].name, jobnum)
+        self.logger.info(&quot;[run %s/%d]&quot; % (self.jobs[jobnum].name, jobnum))
         self._runThread(jobnum)
 
         # reschedule the job if requested</diff>
      <filename>lightmon/client/client.py</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,7 @@
+import logging
 import sys
 
+from lightmon import config
 from lightmon.client import client
 from lightmon.jobs import DummyJob
 
@@ -7,6 +9,10 @@ def run():
     &quot;&quot;&quot;
     Start the client timeline
     &quot;&quot;&quot;
+
+    logging.basicConfig(filename=config.LOGGING_FILE,
+                        level=config.LOGGING_LEVEL)
+
     cl = client.Client()
 
     job = DummyJob(&quot;test job&quot;, delay=10, repeat=True)</diff>
      <filename>lightmon/client/runner.py</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,13 @@
 &quot;&quot;&quot;
 Default settings for lightmon
 &quot;&quot;&quot;
+import logging
 
 # self check the lightmon status every SELF_CHECK_EVERY seconds
 SELF_CHECK_EVERY = 1
+
+# logging default level
+LOGGING_LEVEL = logging.INFO
+
+# log file
+LOGGING_FILE = &quot;lightmon.log&quot;</diff>
      <filename>lightmon/config.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7c6cd1ae378046b371e29c291351835671e061d7</id>
    </parent>
  </parents>
  <author>
    <name>Ivan Giuliani</name>
    <email>giuliani.v@gmail.com</email>
  </author>
  <url>http://github.com/kratorius/lightmon/commit/2ecd70c5923d089bbf5207579ca375f21ea40797</url>
  <id>2ecd70c5923d089bbf5207579ca375f21ea40797</id>
  <committed-date>2009-11-04T05:36:38-08:00</committed-date>
  <authored-date>2009-11-04T05:36:38-08:00</authored-date>
  <message>Added basic logging facilities through logging module</message>
  <tree>aa1720a474f5c764c5823274b9449a5d69cdb09a</tree>
  <committer>
    <name>Ivan Giuliani</name>
    <email>giuliani.v@gmail.com</email>
  </committer>
</commit>
