.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Zonemaster::Engine::Logger::Entry 3pm" .TH Zonemaster::Engine::Logger::Entry 3pm 2024-04-22 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Zonemaster::Engine::Logger::Entry \- module for single log entries .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& Zonemaster::Engine\->logger\->add( TAG => { some => \*(Aqarguments\*(Aq }); .Ve .PP There should never be a need to create a log entry object in isolation. They should always be associated with and created via a logger object. .SH "CLASS METHODS" .IX Header "CLASS METHODS" .IP new 4 .IX Item "new" Construct a new object. .IP levels 4 .IX Item "levels" Returns a hash where the keys are log levels as strings and the corresponding values their numeric value. .IP \fBstart_time_now()\fR 4 .IX Item "start_time_now()" Set the logger's start time to the current time. .IP \fBreset_config()\fR 4 .IX Item "reset_config()" Clear the test level cached configuration. .SH ATTRIBUTES .IX Header "ATTRIBUTES" .IP module 4 .IX Item "module" The name of the module associated to the entry, or "System". .IP testcase 4 .IX Item "testcase" The name of the test case which generated the entry, or "Unspecified". .IP tag 4 .IX Item "tag" The tag that was set when the entry was created. .IP args 4 .IX Item "args" The argument hash reference that was provided when the entry was created. .IP timestamp 4 .IX Item "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. .IP level 4 .IX Item "level" The log level associated to this log entry. .SH METHODS .IX Header "METHODS" .IP string 4 .IX Item "string" Simple method to generate a string representation of the log entry. Overloaded to the stringification operator. .IP argstr 4 .IX Item "argstr" Returns the string representation of the message arguments. .IP printable_args 4 .IX Item "printable_args" Used to transform data from an internal/JSON representation to a "user friendly" representation one. .IP numeric_level 4 .IX Item "numeric_level" Returns the log level of the entry in numeric form.