Opened 8 years ago

Last modified 3 years ago

#3432 assigned Enhancement

Let the daemon's log file be set in settings.json

Reported by: snake98 Owned by: charles
Priority: Normal Milestone: Sometime
Component: Daemon Version: 2.01
Severity: Minor Keywords:
Cc: eirnym@…

Description

It would be nice to be able to set the log file settings (-e --logfile) in the settings.json

Attachments (3)

3432.gzip (753 bytes) - added by andrei 4 years ago.
Patch to try to add this functionality to the daemon. It consists of a few lines in daemon.c and adding a new quark called "logfile" in quark.c/.h
ticket-3432-r2.diff (847 bytes) - added by jordan 4 years ago.
proposed revision to first draft
ticket-3432-r3.diff (771 bytes) - added by mike.dld 3 years ago.
Sync jordan's patch with current trunk

Download all attachments as: .zip

Change History (15)

comment:1 Changed 8 years ago by User294

Yes, me tried this too and failed. Looks like setting logfile via settings.json not works but as for me I would prefer to pass ALL parameters to daemon via config file once it exists. Passing some of them via command line seems to be inconvenient. Ideally it would be nice (at least for me) if GTK/Qt version can also understand this option so they're able to write log file. So I can parse it/read it in real time, etc on my own rather than use (slow and/or inconvenient) built-in log viewers (*nix provides many tools to deal with text in batch modes, built-in viewer does not).

comment:2 Changed 8 years ago by charles

  • Milestone changed from None Set to 2.20
  • Owner set to charles
  • Status changed from new to assigned

comment:3 Changed 8 years ago by charles

ticket #3708 has been closed as a duplicate of this ticket.

comment:4 Changed 7 years ago by jordan

  • Milestone changed from 2.20 to Sometime

Changed 4 years ago by andrei

Patch to try to add this functionality to the daemon. It consists of a few lines in daemon.c and adding a new quark called "logfile" in quark.c/.h

comment:5 Changed 4 years ago by andrei

I've submitted an attachment with a patch that (hopefully) fixes this issue. It consists of a few lines of code in daemon.c and a new quark "logfile" in quark.c/.h

comment:6 Changed 4 years ago by x190

Good idea this! Would help a lot of frustrated forum posters. :)

comment:7 Changed 4 years ago by eirnym

  • Cc eirnym@… added

comment:8 Changed 4 years ago by andrei

Hi! Was this the wrong place to submit the patch? I'd like to be able to get it in if it's any good, I've wanted this ability in transmission for a while now

comment:9 Changed 4 years ago by jordan

Hi andrei, this was the right place to submit the patch, it's just that the devs have been very backlogged lately. I'll try to review your patch in the next day or two -- thanks for submitting it :)

Changed 4 years ago by jordan

proposed revision to first draft

comment:10 Changed 4 years ago by jordan

andrei, I've made a revision for your review or further revision -- let me know what you think.

Changes from revision 1 to revision 2:

  1. since the logfile key is only used in daemon, I removed it from the 'predefined' list of keys and instantiate it locally in daemon instead.
  1. shrunk the scope of settingsLogfileName a little bit; removed unused settingsLogfileNameLen
  1. the new block doesn't set logfileName unless fopen() succeeds

Changed 3 years ago by mike.dld

Sync jordan's patch with current trunk

comment:11 Changed 3 years ago by mike.dld

@andrei, still no comments?

comment:12 Changed 3 years ago by x190.303cal

"Let the daemon's log file be set in settings.json"

...like I was trying to say in #5512. Let's get this one committed this time around.

Note: See TracTickets for help on using tickets.