diff options
| author | P. Christeas <p_christ@hol.gr> | 2010-06-22 12:35:47 +0300 |
|---|---|---|
| committer | P. Christeas <p_christ@hol.gr> | 2010-06-22 12:35:47 +0300 |
| commit | 285e307f256bfef4ccb198586fd9df32eb4e6d5f (patch) | |
| tree | 041fad5ddb551eaff42986441245e424af2035f7 /bin/netsvc.py | |
| parent | 3c3833e824aa6fa0584c28df03c18db04de12c1f (diff) | |
Logging: Allow rpc to set individual log levels.
bzr revid: p_christ@hol.gr-20100622093547-jax4vg7vp0o6zfz2
Diffstat (limited to 'bin/netsvc.py')
| -rw-r--r-- | bin/netsvc.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/netsvc.py b/bin/netsvc.py index d2b6c564111..f3f86e958ed 100644 --- a/bin/netsvc.py +++ b/bin/netsvc.py @@ -268,8 +268,11 @@ class Logger(object): # better ignore the exception and carry on.. pass - def set_loglevel(self, level): - log = logging.getLogger() + def set_loglevel(self, level, *args): + if args and args[0]: + log = logging.getLogger(str(args[0])) + else: + log = logging.getLogger() log.setLevel(logging.INFO) # make sure next msg is printed log.info("Log level changed to %s" % logging.getLevelName(level)) log.setLevel(level) |
