+
    ¡¹]fÓ  c                   sT   € ^ RI Ht ^ RIt^ RIt^ RIt ! R R]P
                  4      tR# )i    Nc                   s²   a a€ ] tR t^t oRtRtRt]tRtRt	^ÿt
^tRtRtRtR]P                   3]P"                  P$                  RRR3V 3R	 lltR
 tRtVtV ;t# )ÚWebsockifySysLogHandlerzV
A handler class that sends proper Syslog-formatted messages,
as defined by RFC 5424.
z<{pri}>{ident}[{pid}]: z2<{pri}>1 {timestamp} {hostname} {ident} {pid} - - Fz%Y-%m-%dT%H:%M:%SZZ
NZ	localhostc                st   <€ W@n         V'       d   RV n        V P                  V n        \        SV `  WV4       R# )am  
Initialize a handler.

If address is specified as a string, a UNIX socket is used. To log to a
local syslogd, "WebsockifySysLogHandler(address="/dev/log")" can be
used. If facility is not specified, LOG_USER is used. If socktype is
specified as socket.SOCK_DGRAM or socket.SOCK_STREAM, that specific
socket type will be used. For Unix sockets, you can also specify a
socktype of None, in which case socket.SOCK_DGRAM will be used, falling
back to socket.SOCK_STREAM. If ident is specified, this string will be
used as the application name in all messages sent. Set legacy to True
to use the old version of the protocol.
TN)ÚidentÚ_legacyÚ_legacy_head_fmtÚ	_head_fmtZsuperÚ__init__)ÚselfÚaddressÚfacilityÚsocktyper   ZlegacyÚ	__class__s   &&&&&&€Ú=/usr/lib/python3.14/site-packages/websockify/sysloghandler.pyr   Z WebsockifySysLogHandler.__init__   s0   ø€ ð" Œ
çØˆDŒLØ!×2Ñ2ˆDŒNä‰Ñ˜¨HÖ5ó    c           
     s  €  V P                  V4      P                  V P                  R4      pV'       g   R# V P                  V P                  V P                  VP                  4      4      p\        P                  ! V P                  \        P                  ! 4       4      p\        P                  ! 4       RV P                   pV P                  '       d   V P                  RV P                   pMRp\         P"                  ! 4       pRVRVRVRVRV/pV P$                  P                   ! R/ VB P'                  R	R
4      p	 W’P'                  R	4      ,          p	V P*                  \        P,                  8w  d]   V P.                  '       d*   R\1        V	4      ,          P'                  R	4      V	,           p	M!WP                  P'                  R	4      ,          p	V P2                  '       d    V P                  P5                  V	4       R# V P*                  \        P,                  8X  d(   V P                  P=                  WP:                  4       R# V P                  P?                  V	4       R#   \(         d    Y’P'                  R4      ,          p	 EL3i ; i  \        P6                   d;    T P9                  T P:                  4       T P                  P5                  T	4        R# i ; i  \@        \B        3 d    h  T PE                  T4        R# ; i)z‘
Emit a record.

The record is formatted, and then sent to the syslog server. If
exception information is present, it is NOT sent to the server.
Z NZ ÚpriÚ	timestampÚhostnamer   ÚpidZasciiZignorez	utf-8-sigz%d © )#ZformatZreplaceÚ_tailZencodePriorityr   ZmapPriorityZ	levelnameÚtimeZstrftimeÚ_timestamp_fmtZgmtimeÚsocketZgethostnameÚ_max_hostnamer   Ú
_max_identÚosZgetpidr   ZencodeZUnicodeEncodeErrorr	   Z
SOCK_DGRAMÚ_send_lengthZlenZ
unixsocketZsendZerrorZ_connect_unixsocketr   ZsendtoZsendallZKeyboardInterruptZ
SystemExitZhandleError)
r   ZrecordZtextr   r   r   r   r   ZheadZmsgs
   &&        r   ÚemitZWebsockifySysLogHandler.emit2   sP  € ð<	%à—;‘;˜vÓ&×.Ñ.¨t¯z©z¸3Ó?ˆDßÙà×%Ñ% d§m¡mØ&*×&6Ñ&6°v×7GÑ7GÓ&HóJˆCô Ÿš d×&9Ñ&9¼4¿;º;»=ÓIˆIä×)Ò)Ó+Ð,?¨T×-?Ñ-?Ð@ˆHàzzˆzØŸ
™
Ð#3 D§O¡OÐ4‘àä—)’)“+ˆCð sØ˜YØ˜HØ˜ØsðˆDð —.‘.×'Ò'Ñ/¨$Ñ/×6Ñ6°wÀÓIˆCð0Ø—{‘{ 7Ó+Õ+ð
 }‰}¤× 1Ñ 1Ô1Ø×$×$Ð$Ø ¤3 s£8Õ+×3Ñ3°GÓ<¸sÕB‘CàŸ:™:×,Ñ,¨WÓ5Õ5Cð ˆð*Ø—K‘K×$Ñ$ SÖ)ð —=‘=¤F×$5Ñ$5Ô5Ø—K‘K×&Ñ& s¯L©LÖ9à—K‘K×'Ñ'¨Ö,øô- &ô 0Ø—{‘{ ;Ó/Õ/“ð0ûô —|‘|ô *Ø×,Ñ,¨T¯\©\Ô:Ø—K‘K×$Ñ$ S×)ð*ûô "¤:Ð.ô 	Øð	%Ø×Ñ˜V×$úso   ‚2K ·BK ÃA)K Ä>I# Å0K ÆAK Ç#J È AK ÉK É#"J	ÊK ÊJ	Ê	K ÊAKËK ËKËK Ë$L)r   r   r   )Z__name__Z
__module__Z__qualname__Z__firstlineno__Z__doc__r   Z_rfc5424_head_fmtr   r   r   r   r   r   r   r   ÚhandlersZSYSLOG_UDP_PORTÚSysLogHandlerZLOG_USERr   r   Z__static_attributes__Z__classdictcell__Z__classcell__)r
   Z__classdict__s   @@r   r    r       sy   ù‡ € ñð
 1ÐØLÐØ!€IØ€GØ)€NØ€MØ€JØ€LØ€Eð €Eð !,¨X×-EÑ-EÐFØ"×0Ñ0×9Ñ9Ø d°5÷6÷4D%ò D%r   r    )Zlogging.handlersr   r   r   r   r   r    r   r   r   Ú<module>r      s"   ðß 5× 5Ñ 5ôr%˜h×4Ñ4ö r%r   