tingea.log(7)
β¨ NAME β¨
tingea.log β the full rundown on how to set the Tingea log parameters π«β¨ (it's chillin' over in the MISCELLANEOUS corner of the manual, filed under tingea.log(7))
πΈ DESCRIPTION πΈ
okay so bestie, the Tingea logging framework is part of the Tingea library. and "logging" here just means a program is out here making statements about what it's doing π¬ β it can do that for a bunch of different purposes and at different levels of verbosity. by default? those logging statements get written on STDERR. no cap.
Tingea logging gives programmers a quick n easy way to associate verbosity levels with logging statements π₯ Only the logging statements whose verbosity level does not exceed the user-imposed threshold actually get executed. and the user can regulate that verbosity level super easily by setting the environment variable TINGEA_LOG_TAG π
alternatively, programs may accept a command line argument β the format accepted by both the environment variable and the command line argument is identical. for the command line, the programmer is free to pick whatever option name they want; it's customarily named -q. the availability of such an option may vary from program to program π BUT: any program that makes use of the Tingea logging facilities can be regulated with the TINGEA_LOG_TAG environment variable. periodt π
one lil ordering thing: if a-qtype option is present and the environment variable is set, then the environment variable is interpreted first, followed by the-qargument. that's the order, that's the vibe.
Tingea logging also lets a programmer assign categories to logging statements π
- the categories
FUNCTIONandDATAhave a subdivision ranging from fine-grained to coarse-grained - the category
MONITORINGhas a subdivision ranging from low priority to high priority - the other categories are unimodal:
IO,THREAD,PROCESS, andGAUGE - and there's three unspecified unimodal categories β
SLOT1,SLOT2, andSLOT3β which can be used to encode program-specific semantics π¦
A programmer may assign multiple categories to a single logging statement. it's unusual for more than two categories to be specified tho. for example, IO and DATA at the LIST level may be combined to indicate a logging statement that provides data summaries for a certain IO related information π
in order of granularity, the DATA levels are CELL, LIST, and AGGREGRATE. so: if the user accepts IO logging and accepts DATA logging at level CELL or LIST, the statement will be executed β
If no IO logging is accepted, or DATA logging is only accepted at the AGGREGRATE level, the statement will be skipped π
By default, all categories that are specified by the programmer need to pass the threshold specified by the user for that category. but the user can relax this requirement so that only one category needs to pass the user threshold π«Ά In the above example, the statement categorized as both IO and DATA at LIST level will be accepted if the user specifies IO and DATA at AGGR level with OR semantics.
π§ SYNTAX π§
the syntax of the TINGEA_LOG_TAG environment variable is described by
[[189x]]{<[dfgimpstABC][1-9]>*,[V]}
which translates to the following, bestie: an optional lead tag is followed by a concatenation of units. a unit is either a pair in [dfgimpstABC] x [1-9x] or the single character V. the leading tag semantics are described further below π
the single character V, if present, specifies that OR semantics should be used rather than the default AND semantics. the semantics for the other units are given below:
dβDATA1βCELL2βLIST3βAGGRxβ turned off
fβFUNCTION1βLINE2βFUNCTION3βMODULE4βAPPLICATIONxβ turned off
mβMONITORING1βDEBUG2βINFO3βWARNING4βERROR5βPANICxβ turned off
gβGAUGEiβIOnβNETWORKpβPROCESS(Inter Process really)tβTHREADAβSLOT1BβSLOT2CβSLOT3
and for that whole bottom block of categories (g, i, n, p, t, A, B, C) the deal is: 1 means on, x means off π
π the lead tag π
the leading tag can be used to set levels for all categories at once, and subsequent units may then alter this initial setting. the lead tag settings and their meaning are these:
1βd1f1m1g1i1p1s1t1A1B1C1β # very yappy9βd3f4m5gxixpxsxtxAxBxCxβ # very terse, only d f m8βd3f4m5g1i1p1s1t1A1B1C1β # less tersexβdxfxmxgxixpxsxtxAxBxCxβ # silent π€«
All categories accept values between 1 and 9 in addition to the value x. as seen above, only a few categories contain more than one level, and no category contains more than five levels. the rule is that if a level exceeds the maximum level available for a category, it is simply interpreted as the maximum level β
π about GAUGE, real talk π
The GAUGE category, if set, indicates that a program may write line based progress bars or other output in which a single line is accumulated over multiple statements. this implies that a single GAUGE logging statement may not result in newline-terminated output π
this is undesirable in case the logging stream is directed to a file that is written to by other applications as well. in that case, turn off GAUGE. no debate.
all other categories are garantueed to result in line-terminated output, by virtue of the programmer contract π«‘
π AUTHOR π
Stijn van Dongen. (the icon, the legend π)
and that's the whole page bestie, you ate π this was tingea.log, version 22-282, dated 9 Oct 2022, and yes it's tingea.log(7). go forth and set those log tags π
β¨π¦
π¦ where this page comes from
- debian bookworm: mcl-doc 1:22-282+ds-2 Β· GPL-3.0-or-later
- debian trixie: mcl-doc 1:22-282+ds-4 Β· GPL-3.0-or-later
- ubuntu noble: mcl-doc 1:22-282+ds-2 Β· GPL-3.0-or-later
- ubuntu questing: mcl-doc 1:22-282+ds-4
- ubuntu resolute: mcl-doc 1:22-282+ds-4build1 Β· GPL-3.0-or-later
- ubuntu stonking: mcl-doc 1:22-282+ds-4build1 Β· GPL-3.0-or-later
- Copyright (c) 2022 Stijn van Dongen
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms