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

Added logger #12

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Added logger #12

wants to merge 4 commits into from

Conversation

riftEmber
Copy link
Contributor

No description provided.

@amikhalev
Copy link
Contributor

We have a particular format that we need to keep for the logger. It is:

<TIMESTAMP> [<LEVEL>] <SOURCE> - <MESSAGE>

Where timestamp has a constant width of 8 and 3 digits of precision.

@amikhalev
Copy link
Contributor

Can we have a STATE log level for state transitions? Such as DisabledInit and Initialize and End in commands

@amikhalev
Copy link
Contributor

Our levels are: INFO WARN ERROR and STATE

void Logger::State(const std::string& message) {
std::cout << std::fixed << std::setprecision(3) << std::setw(8)
<< Timer::GetFPGATimestamp() << " [STATE] " << source << " - "
<< message << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please refactor this into a separate function

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