Log::D...Passing(3pm)
π 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 theMessage::Passing::Role::Outputrole, 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 π
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
- debian bookworm: liblog-dispatch-message-passing-perl 0.009-5 Β· AGPL-3.0-only
- ubuntu noble: liblog-dispatch-message-passing-perl 0.009-5 Β· AGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms