File tree 2 files changed +15
-1
lines changed
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -650,6 +650,13 @@ supports sending logging messages to a remote or local Unix syslog.
650
650
651
651
Closes the socket to the remote host.
652
652
653
+ .. method :: createSocket()
654
+
655
+ Tries to create a socket and, if it's not a datagram socket, connect it
656
+ to the other end. This method is called during handler initialization,
657
+ but it's not regarded as an error if the other end isn't listening at
658
+ this point - the method will be called again when emitting an event, if
659
+ there is no socket at that point.
653
660
654
661
.. method :: emit(record)
655
662
Original file line number Diff line number Diff line change @@ -891,14 +891,21 @@ def _connect_unixsocket(self, address):
891
891
raise
892
892
893
893
def createSocket (self ):
894
+ """
895
+ Try to create a socket and, if it's not a datagram socket, connect it
896
+ to the other end. This method is called during handler initialization,
897
+ but it's not regarded as an error if the other end isn't listening at
898
+ this point - the method will be called again when emitting an event, if
899
+ there is no socket at that point.
900
+ """
894
901
address = self .address
895
902
socktype = self .socktype
896
903
897
904
if isinstance (address , str ):
898
905
self .unixsocket = True
899
906
# Syslog server may be unavailable during handler initialisation.
900
907
# C's openlog() function also ignores connection errors.
901
- # Moreover, we ignore these errors while logging, so it not worse
908
+ # Moreover, we ignore these errors while logging, so it's not worse
902
909
# to ignore it also here.
903
910
try :
904
911
self ._connect_unixsocket (address )
You can’t perform that action at this time.
0 commit comments