Skip to content

Commit

Permalink
debug to stderr
Browse files Browse the repository at this point in the history
Every log output except stream information is routed in
to the stderr.
  • Loading branch information
burlito committed Jan 15, 2014
1 parent 3cbaf32 commit 73d9fe5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA
#
import os
import os, sys

class Logger():
def __init__ (self, debug=False, quiet=False):
Expand All @@ -29,14 +29,14 @@ def __init__ (self, debug=False, quiet=False):

def debug(self, message):
if self.DEBUG and not self.QUIET:
print "# %s" % message
print >> sys.stder, "# %s" % message

def error(self, message):
print "*** %s" % message
print >> sys.stderr, "*** %s" % message

def info(self, message):
if not self.QUIET:
print message
print >> sys.stderr, message


logger = Logger()

0 comments on commit 73d9fe5

Please sign in to comment.