+
    DfjD                     h    R t ]! R4      t^ RIHt ^ t]P                  t ! R R4      tR]]^3R lt	R# )zo
Classes and utility functions for integrating Twisted and syslog.

You probably want to call L{startLogging}.
syslog)logc                   h   a  ] tR t^t o Rt]P                  t]P
                  t]]3R lt	R t
RtV tR# )SyslogObservera9  
A log observer for logging to syslog.

See L{twisted.python.log} for context.

This logObserver will automatically use LOG_ALERT priority for logged
failures (such as from C{log.err()}), but you can use any priority and
facility by setting the 'C{syslogPriority}' and 'C{syslogFacility}' keys in
the event dict.
c                *    V P                  WV4       R# )a  
@type prefix: C{str}
@param prefix: The syslog prefix to use.

@type options: C{int}
@param options: A bitvector represented as an integer of the syslog
    options to use.

@type facility: C{int}
@param facility: An indication to the syslog daemon of what sort of
    program this is (essentially, an additional arbitrary metadata
    classification for messages sent to syslog by this observer).
N)openlog)selfprefixoptionsfacilitys   &&&&7/usr/lib/python3/dist-packages/twisted/python/syslog.py__init__SyslogObserver.__init__#   s     	Vh/    c                   \         P                  ! V4      pVf   R# \        P                  p^ pVR,          '       d   \        P                  pRV9   d   \        VR,          4      pRV9   d   \        VR,          4      pVP                  R4      pVRR R.8X  d   VP                  4        K  RpV FF  pV'       d   RpM	R	V,           pV P                  W4,          R
P                  VR,          V4      4       KH  	  R# )a6  
Send a message event to the I{syslog}.

@param eventDict: The event to send.  If it has no C{'message'} key, it
    will be ignored.  Otherwise, if it has C{'syslogPriority'} and/or
    C{'syslogFacility'} keys, these will be used as the syslog priority
    and facility.  If it has no C{'syslogPriority'} key but a true
    value for the C{'isError'} key, the B{LOG_ALERT} priority will be
    used; if it has a false value for C{'isError'}, B{LOG_INFO} will be
    used.  If the C{'message'} key is multiline, each line will be sent
    to the syslog separately.
NisErrorsyslogPrioritysyslogFacility
 TF	z[{}] {}system)	r   textFromEventDictr   LOG_INFO	LOG_ALERTintsplitpopformat)r   	eventDicttextpriorityr   lines	firstLinelines   &&      r   emitSyslogObserver.emit3   s     $$Y/< ??Y''Hy(9%567Hy(9%567H 

4 BCjRD IIK	D!	d{KK#Y%5%5i6I4%P r    N)__name__
__module____qualname____firstlineno____doc__r   r   DEFAULT_OPTIONSDEFAULT_FACILITYr   r&   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s3     	 nnG]]F'6AQ 0 ) )r   r   Twistedc                b    \        WV4      p\        P                  ! VP                  VR7       R# )a  
Send all Twisted logging output to syslog from now on.

The prefix, options and facility arguments are passed to
C{syslog.openlog()}, see the Python syslog documentation for details. For
other parameters, see L{twisted.python.log.startLoggingWithObserver}.
)	setStdoutN)r   r   startLoggingWithObserverr&   )r	   r
   r   r5   obss   &&&& r   startLoggingr8   _   s$     (
3C  Y?r   N)
r-   
__import__r   twisted.pythonr   r.   LOG_USERr/   r   r8   r(   r   r   <module>r<      sJ   
 
H	  ?? H HX o8HTU@r   