%PDF- %PDF-
Direktori : /usr/lib/python3/dist-packages/twisted/logger/__pycache__/ |
Current File : //usr/lib/python3/dist-packages/twisted/logger/__pycache__/__init__.cpython-312.pyc |
� Ϫ�f) � � � d Z g d�ZddlmZmZ ddlmZ ddlmZm Z m Z mZmZ ddl mZmZ ddlmZmZ ddlmZ dd lmZ dd lmZmZ ddlmZmZmZmZ ddlm Z dd l!m"Z" ddl#m$Z$ ddl%m&Z&m'Z'm(Z( ddl)m*Z*m+Z+m,Z,m-Z- ddl.m/Z/ y)a Twisted Logger: Classes and functions to do granular logging. Example usage in a module C{some.module}:: from twisted.logger import Logger log = Logger() def handleData(data): log.debug("Got data: {data!r}.", data=data) Or in a class:: from twisted.logger import Logger class Foo: log = Logger() def oops(self, data): self.log.error("Oops! Invalid data from server: {data!r}", data=data) C{Logger}s have namespaces, for which logging can be configured independently. Namespaces may be specified by passing in a C{namespace} argument to L{Logger} when instantiating it, but if none is given, the logger will derive its own namespace by using the module name of the callable that instantiated it, or, in the case of a class, by using the fully qualified name of the class. In the first example above, the namespace would be C{some.module}, and in the second example, it would be C{some.module.Foo}. @var globalLogPublisher: The L{LogPublisher} that all L{Logger} instances that are not otherwise parameterized will publish events to by default. @var globalLogBeginner: The L{LogBeginner} used to activate the main log observer, whether it's a log file, or an observer pointing at stderr. )�InvalidLogLevelError�LogLevel�formatEvent�formatEventAsClassicLogText� formatTime�timeFormatRFC3339�eventAsText�extractField�ILogObserver�LogEvent�Logger� _loggerFor�LogPublisher�LimitedHistoryLogObserver�FileLogObserver�textFileLogObserver�PredicateResult�ILogFilterPredicate�FilteringLogObserver�LogLevelFilterPredicate�STDLibLogObserver�LoggingFile�LegacyLogObserverWrapper�globalLogPublisher�globalLogBeginner�LogBeginner�eventAsJSON� eventFromJSON�jsonFileLogObserver�eventsFromJSONLogFile�capturedLogs� )r r )r )r r r r r )r r )r r )r )r )r r )r r r r )r )r )r )r r r )r r r r )r N)0�__doc__�__all__�_levelsr r �_flattenr �_formatr r r r r �_interfacesr r �_loggerr r � _observerr �_bufferr �_filer r �_filterr r r r �_stdlibr �_ior �_legacyr �_globalr r r �_jsonr r r r �_capturer � � �9/usr/lib/python3/dist-packages/twisted/logger/__init__.py�<module>r6 s` �� #�J/��b 4� "�� � 0� '� #� .� 7�� � '� � -� G� G�� � #r4