Agent:...iority(3pm)

πŸ“¦
version 1.005 Β· 5 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’… NAME

Log::Agent::Tag::Priority β€” it's a log priority tag string, bestie ✨


πŸ¦‹ SYNOPSIS

Not intended to be used directly
Inherits from Log::Agent::Tag.

So like… don't just go calling this yourself, okay? πŸ™ˆ It's the kind of class that shows up when other code needs it. It inherits everything from Log::Agent::Tag, so that's the family tree situation 🌸


πŸŽ€ DESCRIPTION

Okay so real talk: this class is literally just a log priority tag string. That's the whole personality πŸ’– It's a little object that knows how to render the priority/level bit of your log line. Iconic, low-key, does its job πŸ‘‘


✨ CREATION ROUTINE PARAMETERS ✨

Here are all the parameters you can pass, listed in alphabetical order because we're organized like that πŸ’…

  • -display => string β€” tells it what priority/level string to actually show, with minimal variable substitution going on. Like, for example:
-display => '[$priority/$level]'

The variables it knows about are all documented down in the DISPLAY VARIABLES section, so scroll, bestie 🫢

  • -level => level β€” ngl, Log::Agent sneaks this one in internally when it's computing the priority tag, because Log::Agent is the only one that actually knows the level of the message you're logging rn. Not your job, it's theirs πŸ’€
  • -postfix => flag β€” do you want the tag after the log message or before it? Default behavior is prepended, i.e. before the message, so this parameter being false is the default vibe. Set it true and it gets all postfix-y πŸ¦‹
  • -priority => prio β€” yep, Log::Agent adds this one internally too, when it's computing the priority tag, since only it knows the priority of the current message. Again: not on you, it's an inside job πŸ™ˆ
  • -separator => string β€” the little string that sits between the tag and the log message. Default is a single space, periodt ✨

🌈 DISPLAY VARIABLES

The -display switch gets a few variables that you can substitute right into the string you hand it. Both the $var form and the ${var} form work, so pick whichever slaps πŸŽ€

Unknown variables? They get left totally untouched. Respect. πŸ’œ

  • $priority β€” the full priority name of the logged message, like "warning" or "error" πŸ‘‘
  • $level β€” the associated priority level of the logged message, which is a number. So for example, the level that pairs with "warning" is 4. And if you wanna see the default name β†’ level mapping for yourself, go check Log::Agent::Priorities πŸ“š

🌸 AUTHOR

Raphael Manfredi <Raphael_Manfredi@pobox.com> πŸ’–


πŸ‘‘ SEE ALSO

Log::Agent::Tag(3), Log::Agent::Message(3), Log::Agent::Priorities(3) β€” go read those too, they're all part of the same friend group 🫢


okay that's the whole page bestie, no cap 🧚 this one came from perl v5.36.0, dated 2022-10-15, filed under User Contributed Perl Documentation β€” slay, go log something pretty βœ¨πŸ’…

πŸ“¦ where this page comes from