Repository: incubator-mynewt-core Updated Branches: refs/heads/develop 65ea82afc -> 0373ef399
log/full; add option to disable log_console. Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/3a108c8a Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/3a108c8a Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/3a108c8a Branch: refs/heads/develop Commit: 3a108c8a1df09254966c6ffbeab178e07880d75c Parents: 65ea82a Author: System Administrator <[email protected]> Authored: Fri Jan 27 17:46:56 2017 -0800 Committer: System Administrator <[email protected]> Committed: Fri Jan 27 17:46:56 2017 -0800 ---------------------------------------------------------------------- sys/log/full/include/log/log.h | 4 ++++ sys/log/full/src/log_console.c | 6 ++++++ sys/log/full/syscfg.yml | 10 +++++++--- 3 files changed, 17 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/3a108c8a/sys/log/full/include/log/log.h ---------------------------------------------------------------------- diff --git a/sys/log/full/include/log/log.h b/sys/log/full/include/log/log.h index 9874784..9d231b8 100644 --- a/sys/log/full/include/log/log.h +++ b/sys/log/full/include/log/log.h @@ -226,9 +226,13 @@ int log_flush(struct log *log); int log_rtr_erase(struct log *log, void *arg); /* Handler exports */ +#if MYNEWT_VAL(LOG_CONSOLE) extern const struct log_handler log_console_handler; +#endif extern const struct log_handler log_cbmem_handler; +#if MYNEWT_VAL(LOG_FCB) extern const struct log_handler log_fcb_handler; +#endif /* Private */ #if MYNEWT_VAL(LOG_NEWTMGR) http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/3a108c8a/sys/log/full/src/log_console.c ---------------------------------------------------------------------- diff --git a/sys/log/full/src/log_console.c b/sys/log/full/src/log_console.c index 0866a5a..7349d17 100644 --- a/sys/log/full/src/log_console.c +++ b/sys/log/full/src/log_console.c @@ -17,6 +17,10 @@ * under the License. */ +#include <syscfg/syscfg.h> + +#if MYNEWT_VAL(LOG_CONSOLE) + #include <os/os.h> #include <cbmem/cbmem.h> #include <console/console.h> @@ -74,3 +78,5 @@ const struct log_handler log_console_handler = { .log_flush = log_console_flush, .log_rtr_erase = NULL, }; + +#endif http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/3a108c8a/sys/log/full/syscfg.yml ---------------------------------------------------------------------- diff --git a/sys/log/full/syscfg.yml b/sys/log/full/syscfg.yml index 7ce1baf..6a2721b 100644 --- a/sys/log/full/syscfg.yml +++ b/sys/log/full/syscfg.yml @@ -23,15 +23,19 @@ syscfg.defs: value: 0 LOG_FCB: - description: 'TBD' + description: 'Support logging to FCB.' value: 0 + LOG_CONSOLE: + description: 'Support logging to console.' + value: 1 + LOG_CLI: - description: 'TBD' + description: 'Expose "log" command in shell.' value: 0 restrictions: - SHELL_TASK LOG_NEWTMGR: - description: 'TBD' + description: 'Expose "log" command in newtmgr.' value: 0
