Log::Message::Item(3)
hey bestie! welcome to the Log::Message::Item(3) page from the User Contributed Perl Documentation β it's giving βmessage objects with main character energyβ and I'm obsessed πβ¨
π NAME π
Log::Message::Item β message objects for Log::Message, periodt. π
β¨ SYNOPSIS β¨
okay so here's the whole vibe in code, bestie β literally the exact synopsis:
# Implicitly used by Log::Message to create Log::Message::Item objects
print "this is the message's id: ", $item->id;
print "this is the message stored: ", $item->message;
print "this is when it happened: ", $item->when;
print "the message was tagged: ", $item->tag;
print "this was the severity level: ", $item->level;
$item->remove; # delete the item from the stack it was on
# Besides these methods, you can also call the handlers on
# the object specifically.
# See the Log::Message::Handlers manpage for documentation on what
# handlers are available by default and how to add your own
π¦ DESCRIPTION π¦
Log::Message::Item is a class that generates generic Log items. these items are stored on a Log::Message stack, so see the Log::Message manpage for the details on how to retrieve them. π«Ά
bestie, you should probably not create new items by yourself β use the storing mechanism provided by Log::Message instead. no cap.
but the accessors and handlers? those are highkey interesting if you want to do fine tuning of how your messages are handled. π₯
the accessors and methods are described below; the handlers are documented in the Log::Message::Handlers manpage. iykyk.
πΈ Methods and Accessors πΈ
π remove
calling remove will remove the object from the stack it was on, so it will not show up any more in subsequent fetches of messages. bye bestie π
you can still call accessors and handlers on it however, to handle it as you will. it's giving βstill iconic after removalβ energy. π
π id
returns the internal ID of the item. this may be useful for comparing since the ID is incremented each time a new item is created. therefore, an item with ID 4 must have been logged before an item with ID 9. math is mathing β¨
π when
returns the timestamp of when the message was logged. clock it, bestie β°
π message
the actual message that was stored. the main character of this whole object, honestly. π
π level
the severity type of this message, as well as the name of the handler that was called upon storing it. so it's both the vibe and the handler name β love that for us. π₯
π tag
returns the identification tag that was put on the message. tag it, bestie π·οΈ
π shortmess
returns the equivalent of a Carp::shortmess for this item. see the Carp manpage for details. short and cute, just like this method. π
π longmess
returns the equivalent of a Carp::longmess for this item, which is essentially a stack trace. see the Carp manpage for details. it's giving detective mode π
π parent
returns a reference to the Log::Message object that stored this item. this is useful if you want to have access to the full stack in a handler. family tree reveal π
π SEE ALSO π
Log::MessageLog::Message::HandlersLog::Message::Config
π«Ά AUTHOR π«Ά
this module by Jos Boumans kane@cpan.org. king behavior π
π Acknowledgements π
thanks to Ann Barcomb for her suggestions. we love a helpful bestie π
π COPYRIGHT π
this module is copyright (c) 2002 Jos Boumans kane@cpan.org. all rights reserved. π«Ά
this library is free software; you may redistribute and/or modify it under the same terms as Perl itself. slay, free software realness π
okay that's the whole page, bestie! this was Log::Message::Item(3) from perl v5.42.0, dated 2014-07-27 β go off and log those messages, you absolute icon πβ¨π
π¦ where this page comes from
- opensuse-leap 16.0: perl-Log-Message 0.08-bp160.1.2 Β· Artistic-1.0 or GPL-1.0+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms