|Summary:||ASTERISK-16231: logger.conf does not create subdirectories or give warnings about them missing|
|Reporter:||Leif Madsen (lmadsen)||Labels:|
|Date Opened:||2010-06-09 07:39:38||Date Closed:||2011-08-12 11:23:19|
|Environment:||Attachments:||( 0) file_logger_failure.diff|
|Description:||Today in testing and documenting the logger.conf, we read that logging can be performed into a full path if you start the filename with a front-slash (we feel you should also be able to specify a relative path from /var/log/asterisk by defining something like: mydirectory/messages -- but we know that is a feature request).|
However, if you specify something like:
/var/log/asterisk/my_new_directory/messages => verbose,notice,warning,error
Then when you do the 'logger reload' you can see that it has loaded successfully with 'logger show channels', but no ERROR is produced showing that the directory does not exist, or an inability to write to the location specified.
No error is also produced when the logging takes place (i.e. when you place a call).
I believe this could be a pretty major error for someone who may expect the logging to work like that ;)
****** ADDITIONAL INFORMATION ******
Ideally I'd like to see it "just work", but understand that is a feature request. At the least though, it should notify you of the impending lost logging information :)
|Comments:||By: Leif Madsen (lmadsen) 2010-10-14 12:56:10|
Yay assigned! :)
By: Kinsey Moore (kmoore) 2011-07-28 16:04:51.967-0500
Looking at logger.c, it does warn that the file can't be opened, but it can't actually log that because the logger lock is held. It doesn't, however, warn that logging operations are failing as they're occurring.
By: Kinsey Moore (kmoore) 2011-07-29 14:28:18.578-0500
The attached patch fixes logging channel creation so unusable logging channels are not added into the list of logging channels. It also makes sure log file open failures are logged to a console instead of just being logged to stderr.
By: Kinsey Moore (kmoore) 2011-08-12 11:23:19.137-0500