[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: 2af3a9411728a631bbf33b41c5a2f317ce611e54
X2Go dev team
git-admin at x2go.org
Wed Jan 8 15:27:16 CET 2014
The branch, build-baikal has been updated
via 2af3a9411728a631bbf33b41c5a2f317ce611e54 (commit)
from c5da60f5a9943d8216572c73d1e0d4bf5c669aaf (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
x2go/log.py | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
The diff of changes is:
diff --git a/x2go/log.py b/x2go/log.py
index e7959d7..96c6ce1 100644
--- a/x2go/log.py
+++ b/x2go/log.py
@@ -57,7 +57,7 @@ class X2goLogger(object):
1024: 'debug-sftpxfer',
}
- def __init__(self, name=sys.argv[0], tag=__NAME__, loglevel=loglevel_DEFAULT):
+ def __init__(self, name=sys.argv[0], loglevel=loglevel_DEFAULT, tag=None):
"""\
@param name: name of the programme that uses Python X2go
@type name: str
@@ -72,7 +72,7 @@ class X2goLogger(object):
self.loglevel = loglevel
self.progpid = os.getpid()
- def message(self, msg, loglevel=loglevel_NONE):
+ def message(self, msg, loglevel=loglevel_NONE, tag=None):
"""\
Log a message.
@@ -82,8 +82,14 @@ class X2goLogger(object):
@type loglevel: int
"""
+ if tag is None:
+ tag = self.tag
if loglevel & self.loglevel:
- self.destination.write('%s[%s] (%s) %s: %s\n' % (self.name, self.progpid, self.tag, self._loglevel_NAMES[loglevel].upper(), msg))
+ if self.tag is not None:
+ self.destination.write('%s[%s] (%s) %s: %s\n' % (self.name, self.progpid, tag, self._loglevel_NAMES[loglevel].upper(), msg))
+ else:
+ self.destination.write('%s[%s] %s: %s\n' % (self.name, self.progpid, self._loglevel_NAMES[loglevel].upper(), msg))
+
__call__ = message
def set_loglevel(self, loglevel_name='none'):
hooks/post-receive
--
python-x2go.git (Python X2Go Client API)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-x2go.git" (Python X2Go Client API).
More information about the x2go-commits
mailing list