~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/lib/sys_mgmt/logging_management.py

  • Committer: Mark Atwood
  • Date: 2011-10-11 22:37:47 UTC
  • mfrom: (2429.2.1 dbqp_revamp)
  • Revision ID: me@mark.atwood.name-20111011223747-vomebzgvnxxysqrm
mergeĀ lp:~patrick-crews/drizzle/dbqp_revamp

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
        self.report_started = 0
54
54
        self.thick_line = '='*(80 - len("20110420-105402  "))
55
55
        self.thin_line = '-'*(80- len("20110420-105402  "))
 
56
        self.verbose_flag = variables['verbose']
 
57
        self.debug_flag = variables['debug']
56
58
 
57
59
    def _write_message(self,level, msg):
58
60
      self.log_file.write("%s %s %s\n" % (time.strftime("%Y%m%d-%H%M%S"), level, str(msg)))
74
76
      self._write_message("ERROR", msg)
75
77
 
76
78
    def verbose(self,msg):
77
 
      self._write_message("VERBOSE", msg)
 
79
      if self.verbose_flag:
 
80
          self._write_message("VERBOSE", msg)
78
81
 
79
82
    def debug(self,msg):
80
 
      self._write_message("DEBUG", msg)
 
83
      if self.debug_flag:
 
84
          self._write_message("DEBUG", msg)
81
85
 
82
86
    def debug_class(self,codeClass):
 
87
      if self.debug_flag:
83
88
        self._write_message("DEBUG**",codeClass)
84
89
        skip_keys = ['skip_keys', 'debug', 'verbose']
85
90
        for key, item in sorted(vars(codeClass).items()):