[SCM] libmessage-passing-perl Debian packaging branch, master, updated. debian/0.111-3-14-g44f6e88

Tomas Doran bobtfish at bobtfish.net
Mon May 6 11:56:44 UTC 2013


The following commit has been merged in the master branch:
commit e9ee4d7c9713ec6452b743176d3c3171b36e6b72
Author: Tomas Doran <bobtfish at bobtfish.net>
Date:   Sun Mar 4 17:44:33 2012 +0000

    Fix lots more docs

diff --git a/lib/Log/Stash/Filter/All.pm b/lib/Log/Stash/Filter/All.pm
index 093d45c..4531124 100644
--- a/lib/Log/Stash/Filter/All.pm
+++ b/lib/Log/Stash/Filter/All.pm
@@ -11,3 +11,34 @@ sub filter {
 __PACKAGE__->meta->make_immutable;
 1;
 
+=head1 NAME
+
+Log::Stash::Filter::All - Filter all messages out.
+
+=head1 DESCRIPTION
+
+This filter just removes all messages, not passing any through.
+
+You would normally never want to use this, but it can be useful for
+testing occasionally.
+
+=head1 METHODS
+
+=head2 filter
+
+Universally returns undef
+
+=head1 SPONSORSHIP
+
+This module exists due to the wonderful people at
+L<Suretec Systems|http://www.suretecsystems.com/> who sponsored it's
+development.
+
+=head1 AUTHOR, COPYRIGHT AND LICENSE
+
+See L<Log::Stash>.
+
+=cut
+
+1;
+
diff --git a/lib/Log/Stash/Filter/Key.pm b/lib/Log/Stash/Filter/Key.pm
index cf21dc0..d9a1f23 100644
--- a/lib/Log/Stash/Filter/Key.pm
+++ b/lib/Log/Stash/Filter/Key.pm
@@ -54,3 +54,46 @@ sub filter {
 __PACKAGE__->meta->make_immutable;
 1;
 
+=head1 NAME
+
+Log::Stash::Filter::Key - Filter a subset of messages out.
+
+=head1 DESCRIPTION
+
+This filter just removes messages which do not have a key matching a certain value.
+
+=head1 ATTRIBUTES
+
+=head2 key
+
+The name of the key. You may use a C< foo.bar > syntax to indicate variables below the top level
+of the hash (i.e. the example would look in C<< $msg->{foo}->{bar} >>.).
+
+=head2 match
+
+The value to match to determine if the message should be passed onto the next stage or filtered out.
+
+=head2 match_type
+
+The type of match to perform, valid values are 'regex' or 'eq', and the latter is the default.
+
+=head1 METHODS
+
+=head2 filter
+
+Does the actual filtering work.
+
+=head1 SPONSORSHIP
+
+This module exists due to the wonderful people at
+L<Suretec Systems|http://www.suretecsystems.com/> who sponsored it's
+development.
+
+=head1 AUTHOR, COPYRIGHT AND LICENSE
+
+See L<Log::Stash>.
+
+=cut
+
+1;
+
diff --git a/lib/Log/Stash/Filter/Null.pm b/lib/Log/Stash/Filter/Null.pm
index 560b132..ef0e423 100644
--- a/lib/Log/Stash/Filter/Null.pm
+++ b/lib/Log/Stash/Filter/Null.pm
@@ -12,3 +12,34 @@ sub filter {
 __PACKAGE__->meta->make_immutable;
 1;
 
+=head1 NAME
+
+Log::Stash::Filter::Null - Filter no messages out.
+
+=head1 DESCRIPTION
+
+This filter does nothing, passing all incoming messages through with no changes.
+
+You would normally never want to use this, but it can be useful for
+testing occasionally.
+
+=head1 METHODS
+
+=head2 filter
+
+returns the message passed to it.
+
+=head1 SPONSORSHIP
+
+This module exists due to the wonderful people at
+L<Suretec Systems|http://www.suretecsystems.com/> who sponsored it's
+development.
+
+=head1 AUTHOR, COPYRIGHT AND LICENSE
+
+See L<Log::Stash>.
+
+=cut
+
+1;
+
diff --git a/lib/Log/Stash/Filter/T.pm b/lib/Log/Stash/Filter/T.pm
index 1c6647c..c7d7026 100644
--- a/lib/Log/Stash/Filter/T.pm
+++ b/lib/Log/Stash/Filter/T.pm
@@ -23,3 +23,40 @@ sub consume {
 __PACKAGE__->meta->make_immutable;
 1;
 
+=head1 NAME
+
+Log::Stash::Filter::T - Send a message stream to multiple outputs.
+
+=head1 DESCRIPTION
+
+This filter is used to duplicate a message stream to two or more outputs.
+
+All messages are duplicated to all output streams, so you may want to follow
+this with L<Log::Stash::Filter::Key> to one or more of those streams.
+
+=head1 ATTRIBUTES
+
+=head2 output_to
+
+Just like a normal L<Log::Stash::Role::Input> class, except takes an array of outputs.
+
+=head1 METHODS
+
+=head2 consume
+
+Sends the consumed message to all output_to instances.
+
+=head1 SPONSORSHIP
+
+This module exists due to the wonderful people at
+L<Suretec Systems|http://www.suretecsystems.com/> who sponsored it's
+development.
+
+=head1 AUTHOR, COPYRIGHT AND LICENSE
+
+See L<Log::Stash>.
+
+=cut
+
+1;
+
diff --git a/lib/Log/Stash/Output/Null.pm b/lib/Log/Stash/Output/Null.pm
index 2a9dd5f..6e62df1 100644
--- a/lib/Log/Stash/Output/Null.pm
+++ b/lib/Log/Stash/Output/Null.pm
@@ -13,14 +13,6 @@ __PACKAGE__->meta->make_immutable;
 
 Log::Stash::Output::Null - /dev/null for logstash messages
 
-=head1 DESCRIPTION
-
-Throws away all messages passed to it.
-
-head1 NAME
-
-Log::Stash::Input::STDIN - STDIN input
-
 =head1 SYNOPSIS
 
     logstash --input STDIN --output Null
@@ -30,13 +22,17 @@ Log::Stash::Input::STDIN - STDIN input
 
 =head1 DESCRIPTION
 
-=head1 SEE ALSO
+Throws away all messages passed to it.
 
-L<Log::Stash>
+=head1 METHODS
+
+=head2 consume
 
-=head1 AUTHOR
+Takes a message and discards it silently.
+
+=head1 SEE ALSO
 
-Tomas (t0m) Doran <bobtfish at bobtfish.net>
+L<Log::Stash>
 
 =head1 SPONSORSHIP
 
@@ -44,16 +40,9 @@ This module exists due to the wonderful people at
 L<Suretec Systems|http://www.suretecsystems.com/> who sponsored it's
 development.
 
-=head1 COPYRIGHT
-
-Copyright Suretec Systems 2012.
-
-Logstash (upon which many ideas for this project is based, but
-which we do not reuse any code from) is copyright 2010 Jorden Sissel.
-
-=head1 LICENSE
+=head1 AUTHOR, COPYRIGHT AND LICENSE
 
-XX - TODO
+See L<Log::Stash>.
 
 =cut
 
diff --git a/lib/Log/Stash/Output/STDOUT.pm b/lib/Log/Stash/Output/STDOUT.pm
index 8aeb2e3..4e3b6f3 100644
--- a/lib/Log/Stash/Output/STDOUT.pm
+++ b/lib/Log/Stash/Output/STDOUT.pm
@@ -24,13 +24,17 @@ Log::Stash::Output::STDOUT - STDOUT output
 
 =head1 DESCRIPTION
 
-=head1 SEE ALSO
+Output messages to STDOUT
 
-L<Log::Stash>
+=head1 METHODS
+
+=head2 consume
 
-=head1 AUTHOR
+Consumes a message by JSON encoding it and printing it, followed by \n
+
+=head1 SEE ALSO
 
-Tomas (t0m) Doran <bobtfish at bobtfish.net>
+L<Log::Stash>
 
 =head1 SPONSORSHIP
 
@@ -38,17 +42,9 @@ This module exists due to the wonderful people at
 L<Suretec Systems|http://www.suretecsystems.com/> who sponsored it's
 development.
 
-=head1 COPYRIGHT
-
-Copyright Suretec Systems 2012.
-
-Logstash (upon which many ideas for this project is based, but
-which we do not reuse any code from) is copyright 2010 Jorden Sissel.
+=head1 AUTHOR, COPYRIGHT AND LICENSE
 
-=head1 LICENSE
-
-XX - TODO
+See L<Log::Stash>.
 
 =cut
 
-
diff --git a/lib/Log/Stash/Output/Test.pm b/lib/Log/Stash/Output/Test.pm
index afbc525..203919b 100644
--- a/lib/Log/Stash/Output/Test.pm
+++ b/lib/Log/Stash/Output/Test.pm
@@ -45,26 +45,17 @@ Log::Stash::Output::Test - Output for use in unit tests
 
 L<Log::Stash>
 
-=head1 AUTHOR
-
-Tomas (t0m) Doran <bobtfish at bobtfish.net>
-
 =head1 SPONSORSHIP
 
 This module exists due to the wonderful people at
 L<Suretec Systems|http://www.suretecsystems.com/> who sponsored it's
 development.
 
-=head1 COPYRIGHT
-
-Copyright Suretec Systems 2012.
-
-Logstash (upon which many ideas for this project is based, but
-which we do not reuse any code from) is copyright 2010 Jorden Sissel.
+=head1 AUTHOR, COPYRIGHT AND LICENSE
 
-=head1 LICENSE
-
-XX - TODO
+See L<Log::Stash>.
 
 =cut
 
+1;
+
diff --git a/lib/Log/Stash/Role/Filter.pm b/lib/Log/Stash/Role/Filter.pm
index fc0403f..06ffe62 100644
--- a/lib/Log/Stash/Role/Filter.pm
+++ b/lib/Log/Stash/Role/Filter.pm
@@ -27,13 +27,27 @@ or permute the structure of messages.
 
 =head1 REQUIRED METHODS
 
-All the methods from L<Log::Stash::Mixin::Consumer> and
-L<Log::Stash::Mixin::Producer> are required, in addition to:
-
 =head2 filter
 
 Called to filter the message. Returns the mangled message.
 
+Note if you return undef then the message is not propagated further up the chain, which may be used
+for filtering out unwanted messages.
+
+=head1 REQUIRED ATTRIBUTES
+
+=head2 output_to
+
+From L<Log::Stash::Role::Input>.
+
+=head1 METHODS
+
+=head2 consume
+
+Consumers a message, calling the filter method provided by the user with the message.
+
+In the case where the filter returns a message, outputs the message to the next step in the chain.
+
 =head1 SEE ALSO
 
 L<Log::Stash>

-- 
libmessage-passing-perl Debian packaging



More information about the Pkg-perl-cvs-commits mailing list