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

console log pretty #3180

Merged
merged 5 commits into from
Apr 15, 2024
Merged

console log pretty #3180

merged 5 commits into from
Apr 15, 2024

Commits on Apr 15, 2024

  1. sys/log: Use autogenerated function to get mod log name

    Current code had switch in function log_module_get_name()
    that returned module name based on some syscfg value first
    then it search modules registered by log_module_register().
    
    Some of the syscfg values used in this code were referring
    to be values that are not any syscfg.yml file.
    
    Now code calls first auto-genereated function logcfg_log_module_name()
    to get those names.
    
    Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
    kasjer committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    21af14f View commit details
    Browse the repository at this point in the history
  2. sys/log: Set name for DFLT_LOG

    DFLT_LOG has now log name specified in syscfg to keep "DEFAULT" as
    default module log name.
    Without this change name would be "DLFT"
    
    Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
    kasjer committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    77ae598 View commit details
    Browse the repository at this point in the history
  3. sys/log: Update modlog name for msc_fat_view and dfu

    This sets module name for logging to nicer values
    
    Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
    kasjer committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    6b55c77 View commit details
    Browse the repository at this point in the history
  4. log_console: Fix image header log print

    console print was using series of hexadecimal formatting
    without specifying filed size it could result in misleading
    printout where leading zeros for each byte are missing.
    
    Now format makes sure that all digits are present.
    
    Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
    kasjer committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    a8fe8a3 View commit details
    Browse the repository at this point in the history
  5. log_console: Add pretty print

    This introduces alternative output of mod log header.
    Log mod module was printed:
      mod=0
    now it is displayed this way:
      [DEFAULT]
    Log level used to be:
      level=2
    Now it is:
      [WRN]
    of nothing if color are requested
    
    Time stamp is not displayed by default if CONSOLE_TICKS is 1
    
    Severity level can be printed in color.
    
    Additional syscfg values that can be used:
    LOG_CONSOLE_PRETTY enable alternative display
    LOG_CONSOLE_PRETTY_WITH_COLORS enables colors for severity level
    LOG_CONSOLE_PRETTY_WITH_TIMESTAMP enables/disables time stamp printing
    
    Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
    kasjer committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    12383a1 View commit details
    Browse the repository at this point in the history