Skip to content

Commit

Permalink
[OLOG-57] do not log to file if path is empty (#84)
Browse files Browse the repository at this point in the history
* [OLOG-57] do not log to file if path is empty

* release notes
  • Loading branch information
Barthelemy authored Jul 13, 2022
1 parent 7c85ed1 commit d4d548f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions doc/releaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,6 @@ This file describes the main feature changes for each InfoLogger released versio

## v2.5.0 - 17/06/2022
- added InfoLogger::filterDiscardSetFile(), to allow saving to local file the messages that would be discarded with filterDiscard(...) settings.

## v2.5.1 - 13/07/2022
- do not try to log to file if the path is empty.
3 changes: 1 addition & 2 deletions src/InfoLogger.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1191,9 +1191,8 @@ void InfoLogger::filterDiscardLevel(int excludeLevel) {
int InfoLogger::filterDiscardSetFile(const char *path, unsigned long rotateMaxBytes, unsigned int rotateMaxFiles, unsigned int rotateNow) {
mPimpl->filterDiscardFileEnabled = false;
int err = mPimpl->filterDiscardFile.setLogFile(path, rotateMaxBytes, rotateMaxFiles, rotateNow);
if (!err) {
if (!err && path != nullptr && path[0] != '\0') {
mPimpl->filterDiscardFileEnabled = true;
//mPimpl->filterDiscardFile.setOutputFormat(SimpleLog::FormatOption::ShowMessage);
}
return err;
}
Expand Down

0 comments on commit d4d548f

Please sign in to comment.