Parse:...:Logger(3pm)

πŸ“¦
version 0.31 Β· 2 versions
  • 0.31 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.31 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Parse:...:Logger β€” the vibe

ok so bestie, welcome to Parse::Dia::SQL::Logger, which lives in the User Contributed Perl Documentation section of your man pages (that's the 3pm energy, iykyk). She's not complicated, she's not doing too much β€” she's literally just a wrapper for Log::Log4perl. That's the whole gig. And honestly? She ate. πŸ’…


✨ NAME ✨

Parse::Dia::SQL::Logger β€” a wrapper for Log::Log4perl. πŸŽ€


🌸 SYNOPSIS 🌸

here's how you actually use her, no gatekeeping:

use Parse::Dia::SQL::Logger;
my $logger = Parse::Dia::SQL::Logger::->new(loglevel => 'INFO');
my $log = $logger->get_logger(__PACKAGE__);
$log->error('error');
$log->info('info');

so you use the module, you make a new logger and tell her your loglevel (in this case 'INFO'), then you grab the logger for your package with get_logger(__PACKAGE__), and then you just... log. error for the oopsies, info for the little updates. iconic behavior. ✨


πŸ’œ DESCRIPTION πŸ’œ

This module is a wrapper around Log::Log4perl. that's it, that's the thesis. she's the cute little intermediary so you don't have to talk to Log::Log4perl directly. lowkey a matchmaker. 🫢


πŸ¦‹ new

The constructor. she makes the object. she's the main character. πŸ‘‘


πŸ¦‹ get_logger

Return the logger singleton object. one logger, one vibe, shared by all. no duplicates, no drama. πŸ’–


πŸ¦‹ log_off

Decrease the log level on all appenders. 1


πŸ¦‹ log_on

Increase the log level on all appenders.


πŸ’€ heads up bestie: those two are the volume knobs of your logging. log_off turns it down, log_on turns it up, and they hit every appender, so there's no sneaky hiding from it.

πŸŽ€ the cute sign-off πŸŽ€

this whole thing is documented as perl v5.36.0 vibes, dated 2022-11-19, and it's filed under Parse:...:Logger(3pm) β€” so go forth, log responsibly, and remember: a wrapper is just a bestie with boundaries. πŸŒˆβ­πŸ’œ