~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/scripts/logger.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2012-01-06 12:11:50 UTC
  • mfrom: (14625.2.7 gina-dsc-binaries)
  • Revision ID: launchpad@pqm.canonical.com-20120106121150-e0bucmb5qeyytnn9
[r=wgrant][bug=911943] Fix SourcePackageReleaseDscBinariesUpdater:
        round chunk_size to int (and document this issue).

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
"""Logging setup for scripts.
7
7
 
8
8
Don't import from this module. Import it from lp.services.scripts.
9
 
 
10
 
Parts of this may be moved into canonical.launchpad somewhere if it is
11
 
to be used for non-script stuff.
12
9
"""
13
10
 
14
11
__metaclass__ = type
48
45
from zope.component import getUtility
49
46
from zope.exceptions.log import Formatter
50
47
 
51
 
from canonical.config import config
52
 
from lp.services.webapp.errorlog import (
53
 
    globalErrorUtility,
54
 
    ScriptRequest,
55
 
    )
56
 
from canonical.librarian.interfaces import (
 
48
from lp.services.config import config
 
49
from lp.services.librarian.interfaces.client import (
57
50
    ILibrarianClient,
58
51
    UploadFailed,
59
52
    )
62
55
    compress_hash,
63
56
    utc_now,
64
57
    )
 
58
from lp.services.webapp.errorlog import (
 
59
    globalErrorUtility,
 
60
    ScriptRequest,
 
61
    )
65
62
 
66
63
# Reexport our custom loglevels for old callsites. These callsites
67
64
# should be importing the symbols from lp.services.log.loglevels
268
265
    True
269
266
 
270
267
    Cleanup:
271
 
    >>> from canonical.testing import reset_logging
 
268
    >>> from lp.testing import reset_logging
272
269
    >>> reset_logging()
273
270
 
274
271
    As part of the options parsing, the 'log' global variable is updated.
349
346
 
350
347
    Cleanup:
351
348
 
352
 
    >>> from canonical.testing import reset_logging
 
349
    >>> from lp.testing import reset_logging
353
350
    >>> reset_logging()
354
351
    """
355
352
    if options is None: