Deluge logging is broken
Deluge logging seems to be broken in alpine.
If you run deluged --do-not-daemonize --loglevel info
(or any other log level besides none), you endlessly get:
deluged -d -L info :
08:11:27 [WARNING ][deluge.config :410 ] Unable to open config file /root/.config/deluge/core.conf: [Errno 2] No such file or directory: '/root/.config/deluge/core.conf'
Unhandled error in Deferred:
08:11:27 [CRITICAL][twisted :154 ] Unhandled error in Deferred:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/deluge/core/daemon_entry.py", line 112, in run_daemon
daemon = Daemon(
File "/usr/lib/python3.8/site-packages/deluge/core/daemon.py", line 94, in __init__
log.info('Deluge daemon %s', get_version())
File "/usr/lib/python3.8/site-packages/twisted/internet/defer.py", line 1613, in unwindGenerator
return _cancellableInlineCallbacks(gen)
File "/usr/lib/python3.8/site-packages/twisted/internet/defer.py", line 1529, in _cancellableInlineCallbacks
_inlineCallbacks(None, g, status)
--- <exception caught here> ---
File "/usr/lib/python3.8/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
result = g.send(result)
File "/usr/lib/python3.8/site-packages/deluge/log.py", line 69, in info
yield LoggingLoggerClass.info(self, msg, *args, **kwargs)
File "/usr/lib/python3.8/logging/__init__.py", line 1434, in info
self._log(INFO, msg, args, **kwargs)
File "/usr/lib/python3.8/logging/__init__.py", line 1565, in _log
fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: findCaller() takes from 1 to 2 positional arguments but 3 were given
Temporarily disabling observer LegacyLogObserverWrapper(<bound method TwistedLoggingObserver.emit of <deluge.log.TwistedLoggingObserver object at 0x7f61790dadf0>>) due to exception: [Failure instance: Traceback: <class 'TypeError'>: findCaller() takes from 1 to 2 positional arguments but 3 were given
/usr/lib/python3.8/encodings/cp437.py:17:<module>
/usr/lib/python3.8/site-packages/twisted/internet/defer.py:962:__del__
/usr/lib/python3.8/site-packages/twisted/logger/_logger.py:190:failure
/usr/lib/python3.8/site-packages/twisted/logger/_logger.py:144:emit
--- <exception caught here> ---
/usr/lib/python3.8/site-packages/twisted/logger/_observer.py:131:__call__
/usr/lib/python3.8/site-packages/twisted/logger/_legacy.py:93:__call__
/usr/lib/python3.8/site-packages/deluge/log.py:204:emit
/usr/lib/python3.8/logging/__init__.py:1481:critical
/usr/lib/python3.8/logging/__init__.py:1565:_log
]
Traceback (most recent call last):
File "/usr/lib/python3.8/encodings/cp437.py", line 17, in <module>
class IncrementalEncoder(codecs.IncrementalEncoder):
File "/usr/lib/python3.8/site-packages/twisted/internet/defer.py", line 962, in __del__
log.failure(format,
File "/usr/lib/python3.8/site-packages/twisted/logger/_logger.py", line 190, in failure
self.emit(level, format, log_failure=failure, **kwargs)
File "/usr/lib/python3.8/site-packages/twisted/logger/_logger.py", line 144, in emit
self.observer(event)
--- <exception caught here> ---
File "/usr/lib/python3.8/site-packages/twisted/logger/_observer.py", line 131, in __call__
observer(event)
File "/usr/lib/python3.8/site-packages/twisted/logger/_legacy.py", line 93, in __call__
self.legacyObserver(event)
File "/usr/lib/python3.8/site-packages/deluge/log.py", line 204, in emit
getattr(LoggingLoggerClass, event_dict['log_level'].name)(
File "/usr/lib/python3.8/logging/__init__.py", line 1481, in critical
self._log(CRITICAL, msg, args, **kwargs)
File "/usr/lib/python3.8/logging/__init__.py", line 1565, in _log
fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: findCaller() takes from 1 to 2 positional arguments but 3 were given
This is a Python 3.8 compatibility issue, but there's no bugfix release of Deluge with the patch.