coap_debug.h: Support logging level set to _COAP_LOG_EMERG
coap_pdu.h: handle small ints
coap_pdu_internal.h: handle small ints
coap_session_internal.h: handle small ints
coap_uthash_internal.h: handle small ints
coap_block.c: Handle small ints
coap_debug.c: Fix use of vsnprintf() and vfprintf()
coap_pdu.c: Handle small ints
coap_tinydtls.c: Handle small ints
coap_uri.c: Fix alignment issue in coap_new_uri()
uncrustify run on RIOT examples to conform to RIOT's coding standards/
This allows for code reduction if not all logging levels are required.
Done by defining ./configure --enable-max-logging-level=X, where X can have
the value of 0 through 8 inclusive.
COAP_LOG_EMERG is always logged.
Can save up to 40k bytes.
syslog.h is no longer required for libcoap as all LOG_ usage has been replaced
with COAP_LOG_.
Added #include <stdio.h> to example code for code-client and coap-server as
a hint should application code be using LOG_.
Set up coap_log_t as an enum, using syslog variable names prefixed by
COAP_.
Add function coap_dtls_log() for logging information from (D)TLS libraries.
Update the log output to have use Lower-case variants for the logging levels to
indicate that output is from the (D)TLS library instead of the CoAP library.
(D)TLS libraries updated to be consistent in the usage of
coap_dtls_set_log_level()/coap_dtls_get_log_level().
Add in coap_log_emerg(), coap_log_alert() etc. as wrappers to reduce the line
length required for log entries. Updating all the coap_log() functions to
no longer use syslog variants will be a part of a separate PR.
Added in the "-V" option to the examples, with an initial default of
COAP_LOG_ERR, separating out the CoAP and (D)TLS logging levels.
Note: TinyDTLS log output will be consistent when built against a TinyDTLS
version that contains support for an external logging handler.
Add new function coap_package_build() which returns "git describe --tags"
if available at library build time, else standard package version.
The value of "git describe --tags" is created at run time and passed in as
a compiler -D definition.
Update copyright end dates for updated files.
doc/module_api_wrap.h: New
Used to split modules into Application and Internal only.
include/coap/*.h:
Module (@defgroup) description put into group application_api or internal_api
as appropriate.
Add in @file information if missing.
src/*.c
Add in @file information.
The syslog LOG_ definitions are defined in <syslog.h> and can be defined in
coap_debug.h (wrapped by a HAVE_SYSLOG_H wrapper to prevent duplicaton).
However, the coding order of
include <coap3/coap.h>
include <stdio.h
works, but
include <stdio.h
include <coap3/coap.h>
but fails if the application build environment does not define HAVE_SYSLOG_H
(as is the case of the examples in the examples/ directory).
The former "just" happens to work as the values of the variables are the same.
This fix is to remove the coap_log_t enum and replace it by simple #define
if LOG_ALERT etc. is not already defined.
Make coap_log_t int to remove Visual Studio compile warnings.
This change adds 'SPDX-License-Identifier: BSD-2-Clause' [1] to
the source code files that originate in the libcoap project.
Note that not all files are tagged because they are pulled in
from other sources and thus may fall under a different license.
More information about these is contained in the LICENSE file.
[1] https://spdx.org/licenses/BSD-2-Clause.html