-
Notifications
You must be signed in to change notification settings - Fork 374
sys/log: Improve the console log level indication #3470
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
datarec
is not a concept known to mynewt-core
d5f0b43
to
7de6d49
Compare
Yes, good point - commit message corrected. |
7de6d49
to
11e9837
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have time, you could consider adding colors to syscfg for people with different test.
Name 'MAX' could also be configurable as I assume that in your case it mean something specific and it just happen that LOG_LEVEL_MAX was chosen.
While clang format is not perfect and gives sometime strange output, overall it should be taken into account for obvious fixes here eg. LOG_LEVEL_STR() abomination can be ignored but others (eg comments indent) should be taken into account. We need to move slowly towards coherent style enforced by clangd format.. |
sys/log/full/src/log_console.c
Outdated
}; | ||
|
||
static int real_log_levels = ARRAY_SIZE(log_level_str) - 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets make this const (it is compile-time const anyway)
That's a good idea; will implement it under this PR. |
Will fix the comment indent. As for the LOG_LEVEL_STR() butchery, it looks visually amazing - could be sold as a post-modernist poem. :-) |
Added the option to configure the string & color of MODLOG levels in the console printout from sysconfig; also made text highlighting attribute (for system log modules & highlighted log levels) configurable. Since the maximum MODLOG level is often being used to ensure unconditional logging, it too received its own configuration support.
11e9837
to
9337f95
Compare
Added the option to configure the string & color of MODLOG levels in the console printout from sysconfig; also made text highlighting attribute (for system log modules & highlighted log levels) configurable.
Since the maximum MODLOG level is often being used to ensure unconditional logging, it too received its own configuration support.