Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#8329 closed patch (wontfix)

Patch to change mythbackend's logfile name

Reported by: Bill <billstuff2001@…> Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no


The attached patch allows one to change the logfile used by a running mythbackend process. It basically allows one to keep mythbackend running for days / weeks / months, and roll the logfile as needed. For example, I have a script that does this at midnight so I get a new log for each day.

This is similar to the functionality in #6190, it works as follows:

mythbackend --setlogfile ""

is similar to starting

mythbackend --logfile ""

but will signal the currently running mythbackend instance to change it's log file.

Attachments (1)

148-setlogfile.patch (8.9 KB) - added by Bill <billstuff2001@…> 11 years ago.

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by Bill <billstuff2001@…>

Attachment: 148-setlogfile.patch added

comment:1 Changed 11 years ago by sphery

It would be significantly simpler to implement functionality for mythbackend similar to #3622 --ideally moving the frontend-only log_rotate() code to a library and reusing it in both applications--and using a real log-rotation application along with a SIGHUP to reopen files. If nothing else, we should have a standard approach in both mythfrontend and mythbackend.

comment:2 Changed 11 years ago by danielk

Resolution: wontfix
Status: newclosed

The only proper way to do this is with SIGHUP handling.

comment:3 Changed 11 years ago by sphery

Just as an update (thanks to Chris Pinkham for the information), the backend already has the SIGHUP handler, too. So just have send a SIGHUP to reopen log files after rotating.

Note: See TracTickets for help on using tickets.