.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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::Logger::Entry 3pm" .TH Zonemaster::Logger::Entry 3pm "2021-01-06" "perl v5.32.0" "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::Logger::Entry \- module for single log entries .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& Zonemaster\->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 "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. .SH "ATTRIBUTES" .IX Header "ATTRIBUTES" .IP "module" 4 .IX Item "module" An auto-generated identifier of the module that created the log entry. If it was generated from a module under Zonemaster::Test, it will be an uppercased version of the part of the name after \*(L"Zonemaster::Test\*(R". For example, \*(L"Zonemaster::Test::Basic\*(R" gets the module identifier \*(L"\s-1BASIC\*(R".\s0 If the entry was generated from anywhere else, it will get the module identifier \*(L"\s-1SYSTEM\*(R".\s0 .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 "trace" 4 .IX Item "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. .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 "printable_args" 4 .IX Item "printable_args" Used to transform data from an internal/JSON representation to a \*(L"user friendly\*(R" representation one. .IP "numeric_level" 4 .IX Item "numeric_level" Returns the log level of the entry in numeric form.