You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/10/16 18:00:12 UTC

[GitHub] ccollins476ad opened a new pull request #221: logcfg: Allow logs to be defined in `syscfg.yml`

ccollins476ad opened a new pull request #221: logcfg: Allow logs to be defined in `syscfg.yml`
URL: https://github.com/apache/mynewt-newt/pull/221
 
 
   This PR adds a new feature to newt: A package can define logs in its `syscfg.yml` file under the heading of `syscfg.logs`.  During the build process, newt generates a C header file called `logcfg/logcfg.h` containing macros for using each generated log.  This feature is described in more detail in the commit comments.
   
   This feature serves two purposes:
   1. Allow finer-grained control of which log messages to include in the build.
   2. Provide a means of visualizing the various log modules in the system.
   
   #### Allow finer-grained control of which log messages to include in the build
   Currently, the user can control which log messages get included in the build by setting the `LOG_LEVEL` syscfg setting.  However, this setting applies to every log in the system, and may be too coarse to be useful.  This PR allows the log level to be set per module rather than system-wide.
   
   #### Provide a means of visualizing the various log modules in the system
   Module IDs throughout the system must be unique.  Since third-party packages may define their own log modules, it is currently quite difficult to enforce this constraint.  This PR introduces a few newt commands (`target log show` and `target log brief`) that display tables describing the log modules in use by the system.  Moreover, newt now aborts the build if it detects a log module conflict.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services