Zonema...::Entry(3pm)

πŸ“¦ version 1.0.16, in ubuntu jammy

πŸ’– Zonema...::Entry(3pm) πŸ’–

okay bestie, welcome to Zonemaster::Logger::Entry β€” the module for single log entries, from the User Contributed Perl Documentation, no cap. this is the lil' unit of logging that the whole Zonemaster logger situation runs on, and yeah we're gonna go through every single bit of it together 🫢


✨ NAME ✨

Zonemaster::Logger::Entry</purl> β€” module for single log entries. that's the whole vibe. one entry, one moment in time, logged forever πŸ’…


🌸 SYNOPSIS 🌸

Zonemaster->logger->add( TAG => { some => 'arguments' });

so literally the way you use this is you go through a logger, you call add, you hand it a TAG and a hashref of some => 'arguments', and boom, an entry exists. iconic

🚨 real talk: there should never be a need to create a log entry object in isolation. like, do not be out here constructing these by yourself. They should always be associated with and created via a logger object. periodt.

πŸŽ€ CLASS METHODS πŸŽ€

  • levels β€” Returns a hash where the keys are log levels as strings and the corresponding values their numeric value. so string name in, number out, cute lil lookup table fr fr.
  • start_time_now() β€” Set the logger's start time to the current time. that's it, that's the whole method, and honestly? she ate. ⏰

πŸ¦‹ ATTRIBUTES πŸ¦‹

  • module β€” An auto-generated identifier of the module that created the log entry. okay so here's the tea: if it was generated from a module under Zonemaster::Test, it will be an uppercased version of the part of the name after Zonemaster::Test. For example, Zonemaster::Test::Basic gets the module identifier BASIC. If the entry was generated from anywhere else, it will get the module identifier SYSTEM. so it's giving either "this test did it" or "the system did it" 😌
  • tag β€” The tag that was set when the entry was created.
  • args β€” The argument hash reference that was provided when the entry was created.
  • timestamp β€” The time after the current program started running when this entry was created. This is a floating-point value with the precision provided by Time::HiRes. floaty and precise, we love her πŸ“
  • trace β€” A partial stack trace for the call that created the entry. Used to create the module tag. Almost certainly not useful for anything else. lowkey just here for the module tag job and then she retires πŸ™ˆ

πŸ’… METHODS πŸ’…

  • string β€” Simple method to generate a string representation of the log entry. Overloaded to the stringification operator. so you can just slap it in a string context and she'll show up looking cute ✨
  • printable_args β€” Used to transform data from an internal/JSON representation to a "user friendly" representation one. glow-up method, honestly 🌈
  • numeric_level β€” Returns the log level of the entry in numeric form. numbers only, no strings attached πŸ”’

and that's the whole page, bestie!! every method, every attribute, every example, nothing skipped, we keep it thorough in this house 🫢

cute sign-off time: this page is from perl v5.32.0, dated 2021-01-06, and it's Zonema...::Entry(3pm) β€” User Contributed Perl Documentation. go log something iconic, mwah πŸ’‹πŸ‘‘

πŸ“¦ where this page comes from