Browse Source

M logging.py

-- add processID to log messages
main
Joshua Boverhof 17 years ago
parent
commit
04d96fee25
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      logging.py

+ 2
- 1
logging.py View File

@@ -5,7 +5,7 @@
# #
"""Logging""" """Logging"""
ident = "$Id$" ident = "$Id$"
import sys
import os, sys


WARN = 1 WARN = 1
DEBUG = 2 DEBUG = 2
@@ -134,6 +134,7 @@ class GLRecord(dict):


def __init__(self, date=None, **kw): def __init__(self, date=None, **kw):
kw['ts'] = date or self.GLDate() kw['ts'] = date or self.GLDate()
kw['gid'] = kw.get('gid') or os.getpid()
dict.__init__(self, kw) dict.__init__(self, kw)


def __str__(self): def __str__(self):


Loading…
Cancel
Save