Repository: incubator-mynewt-core Updated Branches: refs/heads/develop 427d6b49d -> ae4d7776e
sys/log/stub; add defines for log levels. 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/ae4d7776 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/ae4d7776 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/ae4d7776 Branch: refs/heads/develop Commit: ae4d7776ee60bff730835dc9d0b8c1ddb5ac0b12 Parents: 427d6b4 Author: Marko Kiiskila <[email protected]> Authored: Tue Jan 17 20:52:09 2017 -0800 Committer: Marko Kiiskila <[email protected]> Committed: Tue Jan 17 20:52:09 2017 -0800 ---------------------------------------------------------------------- sys/log/stub/include/log/log.h | 9 ++++++++- sys/log/stub/syscfg.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ae4d7776/sys/log/stub/include/log/log.h ---------------------------------------------------------------------- diff --git a/sys/log/stub/include/log/log.h b/sys/log/stub/include/log/log.h index d9a3b84..0aaf8f3 100644 --- a/sys/log/stub/include/log/log.h +++ b/sys/log/stub/include/log/log.h @@ -33,7 +33,14 @@ extern "C" { #define LOG_ERROR(__l, __mod, ...) IGNORE(__VA_ARGS__) #define LOG_CRITICAL(__l, __mod, ...) IGNORE(__VA_ARGS__) -#define LOG_SYSLEVEL ((uint8_t)0xff) +#define LOG_LEVEL_DEBUG 0 +#define LOG_LEVEL_INFO 1 +#define LOG_LEVEL_WARN 2 +#define LOG_LEVEL_ERROR 3 +#define LOG_LEVEL_CRITICAL 4 +/* Up to 7 custom log levels. */ +#define LOG_LEVEL_MAX UINT8_MAX +#define LOG_SYSLEVEL UINT8_MAX struct log { }; http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ae4d7776/sys/log/stub/syscfg.yml ---------------------------------------------------------------------- diff --git a/sys/log/stub/syscfg.yml b/sys/log/stub/syscfg.yml new file mode 100644 index 0000000..1053fff --- /dev/null +++ b/sys/log/stub/syscfg.yml @@ -0,0 +1,27 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +syscfg.defs: + LOG_LEVEL: + description: 'Compile time log level stub' + value: 255 + + LOG_FCB: + description: 'Stub' + value: 0
