From d11b162ac67268e77c39d633972bc3e05d3f7995 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 14 Apr 2024 10:21:09 -0700 Subject: Add clarification about logged content. --- docs/man/nng_log.3.adoc | 3 +++ docs/man/nng_log_set_logger.adoc | 1 + 2 files changed, 4 insertions(+) (limited to 'docs/man') diff --git a/docs/man/nng_log.3.adoc b/docs/man/nng_log.3.adoc index 852f765b..358264c2 100644 --- a/docs/man/nng_log.3.adoc +++ b/docs/man/nng_log.3.adoc @@ -55,6 +55,9 @@ The severity can be one of the following values: The message itself is handled according to the logging facility set up with xref:nng_mg_set_logger.3.adoc[`nng_log_set_logger`]. Message delivery is best effort, and messages may be suppressed based on the priority set with xref:nng_log_set_level.3.adoc[`nng_log_set_level`]. +Note that in order to get log messages, a suitable logger must be set using `nng_log_set_logger`. +The default logger, `nng_null_logger` simply discards logged content. + == SEE ALSO xref:nng_log_set_facility.3.adoc[nng_log_set_facility(3)], diff --git a/docs/man/nng_log_set_logger.adoc b/docs/man/nng_log_set_logger.adoc index 4f3cafc8..eedbca49 100644 --- a/docs/man/nng_log_set_logger.adoc +++ b/docs/man/nng_log_set_logger.adoc @@ -36,6 +36,7 @@ Only a single logger may be registered at a time. If needed, the logger should make copies of either _msgid_ or _msg_, as those may not be valid once the logger function returns. The `nng_null_logger` function is an implementation of `nng_logger` that simply discards the content. +This is the default logger, so logging is disabled by default. The `nng_stderr_logger` function is an implementation that logs messages to the standard error stream. It will attempt to colorize messages by the severity, if the standard error is a terminal device. -- cgit v1.2.3-70-g09d2