Skip to content

Conversation

@t-lohse
Copy link
Contributor

@t-lohse t-lohse commented May 22, 2023

Depends on #165
Fixes #153
This adds a new macro msg that either sends Information through gRPC to the client, or prints it to stdout if Reveaal is run in the CLI.
This implementation works if no parallelism is implemented on a "deeper level", as it uses thread::current.id() to seperate the clients. If this were to change, a new way of handling clients should be implemented. Should I add a todo, or implement a more futureproof version?

msg can be used in a number of ways:

msg!("message") | msg!("{}", message) // makes severity = Info, and subject = "General"
msg!("Subject", msg: "message") | msg!("Subject", msg: "{}", message) // makes severity = Info
msg!(severity, subject: "Subject", msg: "message") | msg!("Subject", msg: "{}", message) // Sets everything explicitly

I am unsure if it should be so explicit, we could reduce them to look like a function call? (msg!(severity, subject, message))

@t-lohse t-lohse marked this pull request as ready for review May 22, 2023 07:56
@t-lohse t-lohse requested a review from seblund May 22, 2023 07:57
@t-lohse t-lohse force-pushed the information-logger branch from a70b2c8 to 37c8f12 Compare May 22, 2023 08:22
@t-lohse t-lohse marked this pull request as draft May 30, 2023 06:30
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.

Expanded logging

2 participants