|
webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Classes | |
| class | FileSystemHandler |
Functions | |
| def | get_logger (path) |
| def | configure_logging (logging_level=None, logger=None, stream=None, handlers=None) |
| def | configure_logger_to_log_to_file (logger, log_path, filesystem) |
| def webkitpy.common.system.logutils.configure_logger_to_log_to_file | ( | logger, | |
| log_path, | |||
| filesystem | |||
| ) |
| def webkitpy.common.system.logutils.configure_logging | ( | logging_level = None, |
|
logger = None, |
|||
stream = None, |
|||
handlers = None |
|||
| ) |
Configure logging for standard purposes.
Returns:
A list of references to the logging handlers added to the root
logger. This allows the caller to later remove the handlers
using logger.removeHandler. This is useful primarily during unit
testing where the caller may want to configure logging temporarily
and then undo the configuring.
Args:
logging_level: The minimum logging level to log. Defaults to
logging.INFO.
logger: A logging.logger instance to configure. This parameter
should be used only in unit tests. Defaults to the
root logger.
stream: A file-like object to which to log used in creating the default
handlers. The stream must define an "encoding" data attribute,
or else logging raises an error. Defaults to sys.stderr.
handlers: A list of logging.Handler instances to add to the logger
being configured. If this parameter is provided, then the
stream parameter is not used.
| def webkitpy.common.system.logutils.get_logger | ( | path | ) |
Return a logging.logger for the given path.
Returns:
A logger whose name is the name of the module corresponding to
the given path. If the module is in webkitpy, the name is
the fully-qualified dotted module name beginning with webkitpy....
Otherwise, the name is the base name of the module (i.e. without
any dotted module name prefix).
Args:
path: The path of the module. Normally, this parameter should be
the __file__ variable of the module.
Sample usage:
from webkitpy.common.system import logutils
_log = logutils.get_logger(__file__)
1.8.13