b2bua
b2bua copied to clipboard
SipLogger class can be used only on Unix/Linux
b2bua_simple.py
won't run on Windows. It fails to start with the error: ImportError: No module named fcntl
SipLogger.py
imports fcntl
and syslog
modules, which are available only under Linux/Unix platforms.
Python runtime provides msvcrt.locking
method that is somewhat similar to fcntl.flock
. So, it seems that making AsyncLogger.do_write
working on both platforms is quite straightforward.
AsyncLoggerSyslog
should be available only on platforms that have syslog
, otherwise SIPLOG_BEND=syslog
should be rejected (with warning) and defaulted to a file.