14 Commits

Author SHA1 Message Date
Justin Maggard
138d03db19 Reload log file on SIGHUP
There's a report about a nightly "crash" when users download, compile
from source, and replace their distro's mindlnad binary.  This is because
the Debian package includes a patch that uses SIGUSR2 to reopen the log
file and sends SIGUSR2 from logrotate instead of just using the
"copytruncate" logrotate option.  Then logrotate sends SIGUSR2 at 6:25AM,
which causes us to abort due to the unhandled signal.

I don't want to sacrifice SIGUSR2 just for log rotation, especially when
we already do some reload operations on SIGHUP.  So to avoid this
Debian/Ubuntu issue, we'll explicitly ignore SIGUSR2, and add log file
reopening to the SIGHUP handler.  Then hopefully a future Debian package
version will remove the SIGUSR2 patch and use SIGHUP instead (or
copytruncate).

Fixes: SF Bug #313 (log rotation kills minidlna service)
2018-01-23 22:01:10 -08:00
Darkvater
ba8e479c35 log: enhance setting loglevels
Enable logging level settings such as 'log_level=error' to set all
levels to error, or 'log_level=error,ssdp=maxdebug' to override only one
category
2014-03-06 17:09:39 -08:00
Justin Maggard
aee83a3ee6 * Improve how we clean up after ourselves during exit. 2012-11-16 07:40:40 +00:00
Justin Maggard
2e120e83a0 * Add some logging and forking tweaks to work better with systemd. 2012-10-04 21:04:36 +00:00
Justin Maggard
61fbce18ba * Replace sqlite_int64 with int64_t in many places, to better allow for the possibility of other databases. (Thanks Douglas Carmichael) 2012-06-29 23:14:27 +00:00
Justin Maggard
0a0be0d96c * Add a MAXDEBUG log level. 2012-03-08 18:09:55 +00:00
Justin Maggard
ba7e33a062 * Add support for user-configurable log level settings. 2012-02-14 18:25:39 +00:00
Justin Maggard
bf173e27b4 * Change license text to reference the current FSF mailing address. 2011-06-21 02:08:21 +00:00
Justin Maggard
761f62ca26 * Fix a couple potential frees of invalid pointers. 2011-01-25 22:40:37 +00:00
Justin Maggard
8e0fcd56f9 * Complete/clarify license information. 2010-11-11 23:48:14 +00:00
Justin Maggard
902b2105df * Allow the user to specify where to keep the database in the config file. 2009-11-19 03:22:35 +00:00
Justin Maggard
b74e2d33f3 * Use internal music metadata functions intead of taglib.
1) Taglib does not support MP4 or WMA/ASF without hacking it in there.
  2) Taglib is C++, so it's nice to remove that dependency.
* Use embedded album art where available.
2009-02-25 21:16:51 +00:00
Justin Maggard
2da2f6d4a1 * Add some preliminary code for the eventual possibility of TiVo support. 2009-02-23 23:10:27 +00:00
Justin Maggard
45f294b404 * Use our own logging mechanism instead of syslog/printf. 2009-02-20 10:21:23 +00:00