NNG_LOG_SET_FACILITY(3)

πŸ“¦
version 1.12.0 Β· 4 versions
, in ubuntu stonking

✨ nng_log_set_facility ✨

okay bestie, welcome to the NNG Reference Manual πŸ’– this one's all about nng_log_set_facility from the nng family, and it's genuinely so simple you're gonna eat it up.


🌸 NAME 🌸

nng_log_set_facility β€” set facility used for log messages πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <nng/nng.h>

typedef enum nng_log_facility {
        NNG_LOG_USER   = 1,
        NNG_LOG_DAEMON = 3,
        NNG_LOG_AUTH   = 10,
        NNG_LOG_LOCAL0 = 16,
        NNG_LOG_LOCAL1 = 17,
        NNG_LOG_LOCAL2 = 18,
        NNG_LOG_LOCAL3 = 19,
        NNG_LOG_LOCAL4 = 20,
        NNG_LOG_LOCAL5 = 21,
        NNG_LOG_LOCAL6 = 22,
        NNG_LOG_LOCAL7 = 23,
} nng_log_facility;

void nng_log_set_facility(nng_log_facility facility);

like. look at that enum. eleven little constants just vibing with their assigned numbers, no cap. πŸ‘‘


πŸ’… DESCRIPTION πŸ’…

so nng_log_set_facility is the function you call when you wanna set the facility of the application that's posting logs. it's giving "let me label my logs properly so the right people pick them up" ✨

what's the point? it helps direct your log content when something else β€” like syslog or similar services β€” is the one handling all that log output. basically it's the tag on the outside of the envelope so the mail carrier knows where it's headed. 🫢

⚠️ okay so here's the tea, and it matters: even though the log levels used here overlap with the common levels that the syslog facility uses on POSIX systems, applications should not rely on this. overlap β‰  same thing, bestie. do not build your house on that. 🚫

🌈 SEE ALSO 🌈


and that's the whole page, you understood it on the first read, main character energy fr fr πŸ’–

this was NNG_LOG_SET_FACILITY(3) from the NNG Reference Manual, dated 2026-06-30 β€” go forth and log responsibly, ily, bye βœ¨πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from