summaryrefslogtreecommitdiff
path: root/docs/man
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-04-14 10:21:09 -0700
committerGarrett D'Amore <garrett@damore.org>2024-04-14 18:52:56 -0700
commitd11b162ac67268e77c39d633972bc3e05d3f7995 (patch)
treedb1116edd24fd142ac9c7179f931a1933e29e800 /docs/man
parent9d2ee20ae222ba89ef2345347474659308a8fb92 (diff)
downloadnng-d11b162ac67268e77c39d633972bc3e05d3f7995.tar.gz
nng-d11b162ac67268e77c39d633972bc3e05d3f7995.tar.bz2
nng-d11b162ac67268e77c39d633972bc3e05d3f7995.zip
Add clarification about logged content.
Diffstat (limited to 'docs/man')
-rw-r--r--docs/man/nng_log.3.adoc3
-rw-r--r--docs/man/nng_log_set_logger.adoc1
2 files changed, 4 insertions, 0 deletions
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.