Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 62 lines (54 sloc) 1.647 kb
7c0b7af @ccooper b=451056
ccooper authored
1 # ***** BEGIN LICENSE BLOCK *****
2 # Version: MPL 1.1
3 #
4 # The contents of this file are subject to the Mozilla Public License Version
5 # 1.1 (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
7 # http://www.mozilla.org/MPL/
8 #
9 # Software distributed under the License is distributed on an "AS IS" basis,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 # for the specific language governing rights and limitations under the
12 # License.
13 #
14 # The Original Code is Mozilla-specific Buildbot steps.
15 #
16 # The Initial Developer of the Original Code is
17 # Mozilla Corporation.
18 # Portions created by the Initial Developer are Copyright (C) 2007
19 # the Initial Developer. All Rights Reserved.
20 #
21 # Contributor(s):
22 # Axel Hecht <axel@mozilla.com>
23 # ***** END LICENSE BLOCK *****
6225118 @ccooper Bug 464165 - merge of Axel's buildbotcustom repo, including changes for ...
ccooper authored
24 from twisted.python import log
25 import logging
26 from logging import DEBUG
7c0b7af @ccooper b=451056
ccooper authored
27
6225118 @ccooper Bug 464165 - merge of Axel's buildbotcustom repo, including changes for ...
ccooper authored
28 class LogFwd(object):
29 @classmethod
30 def write(cls, msg):
31 log.msg(msg.rstrip())
32 pass
33 @classmethod
34 def flush(cls):
35 pass
7c0b7af @ccooper b=451056
ccooper authored
36
6225118 @ccooper Bug 464165 - merge of Axel's buildbotcustom repo, including changes for ...
ccooper authored
37 def init(**kw):
38 logging.basicConfig(stream = LogFwd,
39 format = '%(name)s: (%(levelname)s) %(message)s')
40 for k, v in kw.iteritems():
41 logging.getLogger(k).setLevel(v)
7c0b7af @ccooper b=451056
ccooper authored
42
6225118 @ccooper Bug 464165 - merge of Axel's buildbotcustom repo, including changes for ...
ccooper authored
43 def critical(cat, msg):
44 logging.getLogger(cat).critical(msg)
45 pass
46
47 def error(cat, msg):
48 logging.getLogger(cat).error(msg)
49 pass
50
51 def warning(cat, msg):
52 logging.getLogger(cat).warning(msg)
53 pass
54
55 def info(cat, msg):
56 logging.getLogger(cat).info(msg)
57 pass
58
59 def debug(cat, msg):
60 logging.getLogger(cat).debug(msg)
61 pass
Something went wrong with that request. Please try again.