Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logger: fix file open issue if crypto algorithm is disabled #24156

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jnippula
Copy link
Contributor

Create empty file even if crypto key is not stored into the beginning of the log file to allow file logger to always append log data into existing file.

Solved Problem

Fixes #24155

Solution

  • In case crypto is disabled and there is no key data to be stored into the beginning of the file, just create empty file to make sure the file already exists when logger starts appending log data later on.

Changelog Entry

For release notes:

Bugfix: Fix logger file open when SDLOG_ALGORITHM is 0 (crypto disabled)

Alternatives

Could also add "append" parameter to start_log() function to select whether file needs to be opened as APPEND or CREATE flag.

Test coverage

  • Unit/integration test: To be done..

Create empty file even if crypto key is not stored into the beginning
of the log file to allow file logger to always append log data into
existing file.
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.

[Bug] Logging not working with crypto_algorithm==NONE
1 participant