This is an automated email from the ASF dual-hosted git repository. jerzy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push: new a1d48df0b sys/log: Add easy full/stub selector a1d48df0b is described below commit a1d48df0b2376238defe4255e993876bd0fe79b9 Author: Jerzy Kasenberg <jerzy.kasenb...@codecoup.pl> AuthorDate: Mon May 9 11:28:49 2022 +0200 sys/log: Add easy full/stub selector Application could use sys/log/full or sys/log/stub. Now it is possible to specify in syscfg LOG_VARIANT to select one of the packages. This way log variant can be easily changed in target with one syscfg value. --- sys/log/pkg.yml | 31 +++++++++++++++++++++++++++++++ sys/log/syscfg.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/sys/log/pkg.yml b/sys/log/pkg.yml new file mode 100644 index 000000000..4e9a4b7c7 --- /dev/null +++ b/sys/log/pkg.yml @@ -0,0 +1,31 @@ +# +# 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. +# + +pkg.name: sys/log +pkg.description: API common to both the full and stub log implementations. +pkg.author: "Apache Mynewt <d...@mynewt.apache.org>" +pkg.homepage: "http://mynewt.apache.org/" +pkg.keywords: + - logging + +pkg.deps.'LOG_IMPLEMENTATION=="full"': + - sys/log/full + +pkg.deps.'LOG_IMPLEMENTATION=="stub"': + - sys/log/stub diff --git a/sys/log/syscfg.yml b/sys/log/syscfg.yml new file mode 100644 index 000000000..9f809482e --- /dev/null +++ b/sys/log/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_IMPLEMENTATION: + description: > + Selects log implementation package full of stub. + value: stub + choices: + - full + - stub