Zonema...::Entry(3pm)
π 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 underZonemaster::Test, it will be an uppercased version of the part of the name afterZonemaster::Test. For example,Zonemaster::Test::Basicgets the module identifierBASIC. If the entry was generated from anywhere else, it will get the module identifierSYSTEM. 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 byTime::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
- ubuntu jammy: libzonemaster-perl 1.0.16-2.1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms