b2bua icon indicating copy to clipboard operation
b2bua copied to clipboard

SipLogger class can be used only on Unix/Linux

Open a-tinsmith opened this issue 8 years ago • 0 comments

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.

a-tinsmith avatar Mar 16 '16 06:03 a-tinsmith