logger::appender(n)
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:
-levellevel β 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.-serviceservice β 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.-appenderArgsappenderArgs β 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 π-conversionPatternconversionPattern β the log pattern to use. and if you're like "what substitutions tho??" β go peek atlogger::utils::createLogProc, that's where the allowed substitutions live. iykyk π-procNameprocName β if you wanna be extra and explicitly set the name of the created procedure, this is your girl. no guessing, you just say it.-procNameVarprocNameVar β 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 β¨
appenderlogger
β¨ CATEGORY β¨
Programming tools π§β¨
β¨ COPYRIGHT β¨
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
- fedora 43: tcllib 2.0-3.fc43 Β· TCL
- fedora 44: tcllib 2.0-4.fc44 Β· TCL
- nixos 26.05: tcllib 2.0
- nixpkgs unstable: tcllib 2.0
- Copyright (c) 2005 Aamer Akhter <aakhter@cisco\&.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms