Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 70 lines (54 sloc) 1.651 kb
7c0b7af2 »
2008-09-24 b=451056
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 *****
62251183 »
2009-03-06 Bug 464165 - merge of Axel's buildbotcustom repo, including changes f…
24 from twisted.python import log
25 import logging
26 from logging import DEBUG
7c0b7af2 »
2008-09-24 b=451056
27
62ff0b1c »
2013-01-21 nobug: PEP8! r=bitrotallthethings
28
62251183 »
2009-03-06 Bug 464165 - merge of Axel's buildbotcustom repo, including changes f…
29 class LogFwd(object):
30 @classmethod
31 def write(cls, msg):
32 log.msg(msg.rstrip())
33 pass
62ff0b1c »
2013-01-21 nobug: PEP8! r=bitrotallthethings
34
62251183 »
2009-03-06 Bug 464165 - merge of Axel's buildbotcustom repo, including changes f…
35 @classmethod
36 def flush(cls):
37 pass
7c0b7af2 »
2008-09-24 b=451056
38
62ff0b1c »
2013-01-21 nobug: PEP8! r=bitrotallthethings
39
62251183 »
2009-03-06 Bug 464165 - merge of Axel's buildbotcustom repo, including changes f…
40 def init(**kw):
62ff0b1c »
2013-01-21 nobug: PEP8! r=bitrotallthethings
41 logging.basicConfig(stream=LogFwd,
42 format='%(name)s: (%(levelname)s) %(message)s')
62251183 »
2009-03-06 Bug 464165 - merge of Axel's buildbotcustom repo, including changes f…
43 for k, v in kw.iteritems():
44 logging.getLogger(k).setLevel(v)
7c0b7af2 »
2008-09-24 b=451056
45
62ff0b1c »
2013-01-21 nobug: PEP8! r=bitrotallthethings
46
62251183 »
2009-03-06 Bug 464165 - merge of Axel's buildbotcustom repo, including changes f…
47 def critical(cat, msg):
48 logging.getLogger(cat).critical(msg)
49 pass
50
62ff0b1c »
2013-01-21 nobug: PEP8! r=bitrotallthethings
51
62251183 »
2009-03-06 Bug 464165 - merge of Axel's buildbotcustom repo, including changes f…
52 def error(cat, msg):
53 logging.getLogger(cat).error(msg)
54 pass
55
62ff0b1c »
2013-01-21 nobug: PEP8! r=bitrotallthethings
56
62251183 »
2009-03-06 Bug 464165 - merge of Axel's buildbotcustom repo, including changes f…
57 def warning(cat, msg):
58 logging.getLogger(cat).warning(msg)
59 pass
60
62ff0b1c »
2013-01-21 nobug: PEP8! r=bitrotallthethings
61
62251183 »
2009-03-06 Bug 464165 - merge of Axel's buildbotcustom repo, including changes f…
62 def info(cat, msg):
63 logging.getLogger(cat).info(msg)
64 pass
65
62ff0b1c »
2013-01-21 nobug: PEP8! r=bitrotallthethings
66
62251183 »
2009-03-06 Bug 464165 - merge of Axel's buildbotcustom repo, including changes f…
67 def debug(cat, msg):
68 logging.getLogger(cat).debug(msg)
69 pass
Something went wrong with that request. Please try again.