Skip to content

syslog: Added separator in file logs. - #3869

Merged
xiaoxiang781216 merged 1 commit into
apache:masterfrom
fjpanag:syslog_separate
Jun 9, 2021
Merged

xiaoxiang781216 merged 1 commit into
apache:masterfrom
fjpanag:syslog_separate

Conversation

@fjpanag

@fjpanag fjpanag commented Jun 8, 2021

Copy link
Copy Markdown
Contributor

Summary

Added the ability to separate log sessions in files.

This can be useful to easily distinguish between log entries that belong to different log sessions (e.g. system reboot), and to indicate that between the separated lines there may be more logs that were lost.

Note that the separator is hard-coded (currently set to two newlines).
Unfortunately this is not possible to be configurable. Kconfig does not support escaped characters in strings, so chars like \n are not possible to be set. Since a separator is expected to contain at least one \n, Kconfig is unsuitable.

If anyone has any idea on how this can be configurable, please let me know.

Impact

None on existing configurations.

Testing

Tested on file logged in SD card.

@fjpanag

fjpanag commented Jun 8, 2021

Copy link
Copy Markdown
Contributor Author

Something is wrong with CI, I think...
Can someone please restart this?

Comment thread drivers/syslog/syslog_filechannel.c Resolved
@fjpanag
fjpanag force-pushed the syslog_separate branch from d4fa7cf to b07351d Compare June 9, 2021 08:20
@xiaoxiang781216
xiaoxiang781216 merged commit b73dc0f into apache:master Jun 9, 2021
@fjpanag
fjpanag deleted the syslog_separate branch June 9, 2021 15:14
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