Skip to content

Disable creation of unnecessary log files - #6315

Merged
dorodnic merged 1 commit into
realsenseai:developmentfrom
AndrejOrsula:disable-empty-log-files
Apr 29, 2020
Merged

Disable creation of unnecessary log files#6315
dorodnic merged 1 commit into
realsenseai:developmentfrom
AndrejOrsula:disable-empty-log-files

Conversation

@AndrejOrsula

Copy link
Copy Markdown
Contributor

OS: Ubuntu 18.04
SDK: 2.34.0
Device: D415

Issue Description: I am experiencing a purely cosmetic issue, where calls to log_to_console() create log files, i.e. yyyy-MM-dd-HH_mm_ss.log, that remain empty because no logging to file with log_to_file() was requested. I suspect log_to_callback() to result in a similar behaviour as it also calls open() internally, but I have not tested my hypothesis. I assume that this behaviour is unintentional.

Suggested Solution: Configure filename for logging ONLY if it was requested, in which case minimum_file_severity is different than RS2_LOG_SEVERITY_NONE.

@AndrejOrsula

Copy link
Copy Markdown
Contributor Author

@dorodnic

Copy link
Copy Markdown
Contributor

Hi @AndrejOrsula
Thank you very much for the contribution.

@dorodnic dorodnic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@dorodnic
dorodnic merged commit 9d0c65e into realsenseai:development Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants