Page 1 of 1

Logging with date

Posted: Sun Oct 25, 2020 10:57 pm
by benba
Is it possible to enable logging with date and not only with time?

Re: Logging with date

Posted: Sun Nov 01, 2020 6:08 pm
by Shryp
This might work for you:

viewtopic.php?f=8&t=55810

Re: Logging with date

Posted: Mon Nov 02, 2020 8:44 pm
by benba
thanks.

Solution quote:
mhertz wrote:I just checked the code, and for adding date then add e.g. '%Y-%m-%d ' infront of the time operators in line 51's datefmt var of '/usr/lib/python3.8/site-packages/deluge/log.py'.

For appending log, then noticed there where logrotation availability defined, but no code-changes is necesarry, as this feature was added in deluge 2.x together with a '--logrotate' switch.
i use the linuxserver.io docker image -> path;
/usr/lib/python3/dist-packages/deluge/log.py

Code: Select all

--- '%H:%M:%S'
+++ '%Y-%m-%d %H:%M:%S'
result:

Code: Select all

21:55:41 [INFO    ][deluge.configmanager:52  ] Setting config directory to: /config
2020-11-02 21:55:41 [INFO    ][deluge.core.daemon            :94  ] Deluge daemon 2.0.3-2-201906121747-ubuntu18.04.1
2020-11-02 21:55:41 [INFO    ][deluge.core.core              :339 ] Successfully loaded session.state: /config/session.state
2020-11-02 21:55:41 [INFO    ][deluge.core.core              :339 ] Successfully loaded session.state: /config/session.state.bak
2020-11-02 21:55:41 [INFO    ][deluge.core.alertmanager      :148 ] Alert Queue Size set to 10000

Re: Logging with date

Posted: Tue Nov 03, 2020 10:03 pm
by jools772
I had it in:

Code: Select all

/usr/local/lib/python3.8/dist-packages/deluge-2.0.4.dev38-py3.8.egg/deluge/