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

feat (cedarling): Log Startup message #9495

Closed
9 tasks
nynymike opened this issue Sep 14, 2024 · 2 comments · Fixed by #9546
Closed
9 tasks

feat (cedarling): Log Startup message #9495

nynymike opened this issue Sep 14, 2024 · 2 comments · Fixed by #9546
Assignees
Labels
enhancement kind-feature Issue or PR is a new feature request
Milestone

Comments

@nynymike
Copy link
Contributor

nynymike commented Sep 14, 2024

After init is called, the cedarling should write a startup log message with details about its configuration. This is a good way to test the log functionality via Python too.

Identified code changes

  • Create new log interface in Rust
  • Add CEDARLING_LOG_TYPE bootstrap variable to control logging behavior, default to in_memory
  • Add CEDARLING_LOG_EXP_TIME bootstrap variable, default to 60
  • Create log message in cedarling memory and expire it accordingly
  • Adjust Python binding for response, which should be a dictionary of log messages, each with a unique identifier representing the log message identifier, so the client can discard duplicate messages if they happen to return.

Test cases and code coverage

  • Rust unit test
  • Python integration test

Document the changes

  • Update python docs
  • Make sure method in Rust is propery documented with an example.
@mo-auto mo-auto added the kind-feature Issue or PR is a new feature request label Sep 14, 2024
@olehbozhok
Copy link
Contributor

we discussed that it would be OK to use Circular buffer so I change CEDARLING_LOG_EXP_TIME to the CEDARLING_LOG_CACHE_SIZE

@nynymike
Copy link
Contributor Author

Ok for now.

@moabu moabu added this to the 1.1.6 milestone Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement kind-feature Issue or PR is a new feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants