Logging with date

General support for problems installing or using Deluge
Post Reply
benba
Member
Member
Posts: 20
Joined: Mon Oct 28, 2019 10:09 am

Logging with date

Post by benba »

Is it possible to enable logging with date and not only with time?
Shryp
Moderator
Moderator
Posts: 521
Joined: Mon Apr 20, 2015 10:20 pm

Re: Logging with date

Post by Shryp »

This might work for you:

viewtopic.php?f=8&t=55810
benba
Member
Member
Posts: 20
Joined: Mon Oct 28, 2019 10:09 am

Re: Logging with date

Post 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
jools772
Member
Member
Posts: 22
Joined: Fri Oct 25, 2019 8:07 am

Re: Logging with date

Post 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/
Post Reply