Log::D...Passing(3pm)

πŸ“¦
version 0.009 Β· 4 versions
, in debian bookworm, ubuntu noble

πŸ’– Log::Dispatch::Message::Passing πŸ’–

okay bestie, welcome to the User Contributed Perl Documentation glow-up of Log::D...Passing(3pm) β€” yes that's the manual name, it's giving truncated-on-purpose, we move. this is the page for Log::Dispatch::Message::Passing, and it's about yeeting your log events straight into Message::Passing. let's get into it πŸ¦‹


✨ NAME ✨

Log::Dispatch::Message::Passing β€” log events to Message::Passing. literally that's the whole job description and she does it flawlessly πŸ’…


🌸 SYNOPSIS 🌸

in your application code, bestie:

use Log::Dispatch;
use Log::Dispatch::Message::Passing;
use Message::Passing::Filter::Encoder::JSON;
use Message::Passing::Output::ZeroMQ;

my $log = Log::Dispatch->new;

$log->add(Log::Dispatch::Message::Passing->new(
      name      => 'myapp_aggregate_log',
      min_level => 'debug',
      output    => Message::Passing::Filter::Encoder::JSON->new(
          output_to => Message::Passing::Output::ZeroMQ->new(
              connect => 'tcp://192.168.0.1:5558',
          ),
      ),
));

$log->warn($_) for qw/ foo bar baz /;

and then on your central log server, the main character herself:

message-pass --input ZeroMQ --input_options '{"socket_bind":"tcp://*:5558"}' \
  --output File --output_options '{"filename":"myapp_aggregate.log"}'

no cap, that's the whole setup. log on one box, log aggregating on another box, vibes everywhere 🫢


πŸ’œ DESCRIPTION πŸ’œ

so what this gives you is a Log::Dispatch log output system that sends logged events to Message::Passing. that's it, that's the tea β˜•

and the way that this slaps is that it lets you use any of the Message::Passing outputs or filters to process log events and send them across the network. wanna pipe your logs through a filter? slay. wanna ship them over the wire? iconic. and you can use the toolkit to trivially construct a log aggregator β€” like, trivially trivially. lowkey the easiest aggregation arc ever 🌈


πŸ‘‘ METHODS πŸ‘‘

"new"

my $table_log = Log::Dispatch::Message::Passing->new(\%arg);

this method constructs a new Log::Dispatch::Message::Passing output object. new object, who dis ✨

required arguments are:

  • output β€” a Message::Passing Output class (that's the Message::Passing::Role::Output role, iykyk).
fr fr, that one is required. don't skip her, she's the whole point πŸ’€

log_message

this is the method which performs the actual logging, as detailed by Log::Dispatch::Output. she's the one doing the work behind the scenes while everyone else takes the credit 😭


πŸ”₯ SEE ALSO πŸ”₯

  • Message::Passing β€” the logging framework itself, allowing you to very simply build log aggregation and processing servers. the blueprint. the blueprint queen πŸ‘‘
  • Message::Passing::Output::ZeroMQ β€” the recommended network protocol for aggregating or transporting messages across the network.
heads up bestie: whilst this transport is recommended, it is NOT required by this module, so you need to require (and depend on) Message::Passing::ZeroMQ separately. recommended β‰  installed, periodt πŸ’…
  • example/ directory β€” instantly runnable SYNOPSIS β€” plug into your application for easy log aggregation. copy, paste, ascend ✨

πŸŽ€ AUTHOR πŸŽ€

Tomas Doran (t0m) "<bobtfish@bobtfish.net>" β€” king behaviour, honestly 🫢


πŸ’Έ SPONSORSHIP πŸ’Έ

this module exists due to the wonderful people at Suretec Systems Ltd. <http://www.suretecsystems.com/> who sponsored it's development for its VoIP division called SureVoIP <http://www.surevoip.co.uk/> for use with the SureVoIP API β€” <http://www.surevoip.co.uk/support/wiki/api_documentation>. shoutout to the sponsors, we love a patron of the arts πŸ“


Copyright Suretec Systems Ltd. 2012.


⭐ LICENSE ⭐

GNU Affero General Public License, Version 3

and if you feel this is too restrictive to be able to use this software, please talk to us as we'd be willing to consider re-licensing under less restrictive terms. like, actually talk to them, they're nice about it πŸ™ˆ


okay that's the whole page, bestie!! this manual page came from perl v5.34.0, dated 2022-06-30 β€” yes she's got a vintage timestamp and she's still serving πŸ’– now go aggregate some logs, you absolute legend. mwah πŸ’…πŸŒΈ

πŸ“¦ where this page comes from