logger::appender(n)

πŸ“¦
version 2.0 Β· 2 versions
, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

logger::appender πŸ’–

okay so bestie, welcome to the logger::appender page from the logger manual β€” it's part of the tcllib crew and it's lowkey one of the cutest little helper pages you'll ever read. it's all about appenders, and no, that's not a typo for "appendix", we're being ✨fancy✨ here.


✨ NAME ✨

logger::appender β€” a whole collection of predefined appenders for logger. that's it, that's the whole vibe check πŸŽ€


✨ SYNOPSIS ✨

package require Tcl 8.5 9

package require logger::appender ?1.4?

::logger::appender::console -level level -service service ?options...?

::logger::appender::colorConsole -level level -service service ?options...?

so yeah, you need Tcl 8.5 (or 9, she's flexible πŸ’…), you pull in logger::appender at version 1.4 or whatever you've got, and then you call one of the two star appenders. easy. iconic. no cap.


✨ DESCRIPTION ✨

this package is literally just a predefined set of logger templates 🫢 like, somebody already did the work for you, you're welcome, go live your life.


::logger::appender::console -level level -service service ?options...?

this is the main character right here πŸ‘‘ here's everything you can hand her:

  • -level level β€” this is the name of the level that gets dropped into the "priority" slot in the log procedure. so like, you're telling it which level to fill in there, fr fr.
  • -service service β€” the name of the service that gets filled in as the "category" in the log procedure. yes bestie, categories are a thing, we love her.
  • -appenderArgs appenderArgs β€” any extra arguments you wanna hand to the log procedure, and you give them to her in list form. don't forget the list part, that's the whole point πŸ“
  • -conversionPattern conversionPattern β€” the log pattern to use. and if you're like "what substitutions tho??" β€” go peek at logger::utils::createLogProc, that's where the allowed substitutions live. iykyk πŸ’…
  • -procName procName β€” if you wanna be extra and explicitly set the name of the created procedure, this is your girl. no guessing, you just say it.
  • -procNameVar procNameVar β€” the name of the variable to set in the calling context. that variable is gonna end up holding the name of the procedure. sneaky but useful ✨

::logger::appender::colorConsole -level level -service service ?options...?

for the description of the applicable options β€” and this is not a typo, this is genuinely what the page says β€” see ::logger::appender::colorConsole πŸ™ˆ

okay bestie the manpage really does point colorConsole at itself for the options. i'm not making this up, i'm just the messenger πŸŽ€ the options are the same situation as the one above, per the page.

✨ BUGS, IDEAS, FEEDBACK ✨

ngl, this document and the package it's describing are undoubtedly gonna have bugs and other problems. that's just how software is, we don't make the rules 😭

so if you find something, please report it in the logger category of the Tcllib Trackers over at http://core.tcl.tk/tcllib/reportlist 🫢 and while you're there β€” if you've got ideas for enhancements for the package, the docs, or both, report those too! we love a glow-up πŸ’–

if you're proposing code changes, please bring unified diffs, aka the output of:

diff -u

and also β€” important, bestie β€” attachments are strongly preferred over inlined patches. to attach something, go to the Edit form of the ticket right after you create it, and then hit the left-most button in the secondary navigation bar. that's the one. that's the button 🎯


✨ KEYWORDS ✨

  • appender
  • logger

✨ CATEGORY ✨

Programming tools πŸ”§βœ¨


Copyright (c) 2005 Aamer Akhter <aakhter@cisco.com> πŸ’œ


and that's the whole page, bestie!! πŸ¦‹ this lil' beauty came to you courtesy of tcllib, version 1.4 β€” mwah, go forth and append πŸ’…πŸŒΈβ­

πŸ“¦ where this page comes from