DMMP_CONTEXT_LOG_FUNC_SET(3)

πŸ“¦
version 0.15.1 Β· 3 versions
, in arch rolling, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’–

dmmp_context_log_func_set β€” the little function that lets you set your very own log handler function, bestie. she's here to catch all the tea your code is spilling ✨


🌸 SYNOPSIS 🌸

void dmmp_context_log_func_set (struct dmmp_context *ctx, void
(*log_func) (struct dmmp_context *ctx, int priority, const char *file,
int line, const char *func_name, const char *format, va_list args));

πŸŽ€ ARGUMENTS πŸŽ€

  • ctx β€” a pointer of 'struct dmmp_context'. no cap, if this pointer is NULL, your program will be terminated by assert. like, straight up deleted. gone. πŸ’€ so pls pass a real one.
  • log_func β€” a pointer of the log handler function. if you set this to NULL, all log will be ignored. she's just not listening anymore πŸ™ˆ

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the vibe: this function sets a custom log handler. your handler gets invoked whenever a log message is equal or more important (less value) than the log priority setting β€” yes bestie, less value means more important, it's giving upside-down logic but that's just how it is, iykyk.

πŸ’‘ for the full detail usage, go check the manpage libdmmp.h(3). she has the lore. πŸ“–βœ¨

πŸ‘‘ RETURN πŸ‘‘

void

like, she returns nothing. no value, no drama, just vibes. periodt. πŸ’…


and that's the whole page bestie!! 🫢 this was dmmp_context_log_func_set from the Device Mapper Multipath API β€” libdmmp Manual, all the way from June 2025. slay, go log something iconic πŸŒˆβ­πŸ’œ