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

Level always reported as [info] in logs #21

Open
folkengine opened this issue May 17, 2024 · 2 comments
Open

Level always reported as [info] in logs #21

folkengine opened this issue May 17, 2024 · 2 comments

Comments

@folkengine
Copy link
Contributor

I noticed that even though I set the logs to different levels, they always are shown at the info levels. For instance:

EVLOG_verbose << "verbose boop!";
EVLOG_debug << "debug boop!";
EVLOG_info << "info boop!";
EVLOG_warning << "warning boop!";

prints out as

[2024-05-17 17:32:31.427336] [0x0000ffff81207cc0] [info]    verbose boop!
[2024-05-17 17:32:31.427351] [0x0000ffff81207cc0] [info]    debug boop!
[2024-05-17 17:32:31.427352] [0x0000ffff81207cc0] [info]    info boop!
[2024-05-17 17:32:31.427354] [0x0000ffff81207cc0] [info]    warning boop!
@barsnick
Copy link

Can you share some code and your logging.ini?

If I compile and run the example, I get

2024-05-27 16:48:49.502876 hello there     [0x00000f29] [DEBG] {0x00007f687446c740} void Everest::Logging::init(const string&, std::string) :: Logger initialized (using logging.ini)...
2024-05-27 16:48:49.503087 hello there     [0x00000f29] [DEBG] {0x00007f687446c740} int main(int, char**) :: logging_config was set to logging.ini
2024-05-27 16:48:49.503151 hello there     [0x00000f29] [DEBG] {0x00007f687446c740} int main(int, char**) :: This is a DEBUG message.
2024-05-27 16:48:49.503180 hello there     [0x00000f29] [INFO] {0x00007f687446c740}  :: This is a INFO message.
2024-05-27 16:48:49.503205 hello there     [0x00000f29] [WARN] {0x00007f687446c740} int main(int, char**) :: This is a WARNING message.
2024-05-27 16:48:49.503230 hello there     [0x00000f29] [ERRO] {0x00007f687446c740} int main(int, char**) :: This is a ERROR message.
2024-05-27 16:48:49.503254 hello there     [0x00000f29] [CRIT] {0x00007f687446c740} int main(int, char**) :: This is a CRITICAL message.

@hikinggrass
Copy link
Contributor

This might happen if you do not call Everest::Logging::init() before you start to log using the EVLOG macros

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

No branches or pull requests

3 participants