Opened 16 years ago
Closed 16 years ago
Last modified 16 years ago
#8329 closed patch (wontfix)
Patch to change mythbackend's logfile name
| Reported by: | Owned by: | Isaac Richards | |
|---|---|---|---|
| Priority: | minor | Milestone: | unknown |
| Component: | MythTV - General | Version: | Master Head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
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 "log.file.name"
is similar to starting
mythbackend --logfile "log.file.name"
but will signal the currently running mythbackend instance to change it's log file.
Attachments (1)
Change History (4)
by , 16 years ago
| Attachment: | 148-setlogfile.patch added |
|---|
comment:1 by , 16 years ago
comment:2 by , 16 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | new → closed |
The only proper way to do this is with SIGHUP handling.
comment:3 by , 16 years ago
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.

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.