[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:43 UTC 2013


The following commit has been merged in the master branch:
commit a7409afb28055003c0e8c9cf1aa576ed760f462e
Author: Tomas Doran <bobtfish at bobtfish.net>
Date:   Sun Mar 4 16:57:57 2012 +0000

    More docs

diff --git a/lib/Log/Stash.pm b/lib/Log/Stash.pm
index 0d2a56e..df2b1f4 100644
--- a/lib/Log/Stash.pm
+++ b/lib/Log/Stash.pm
@@ -207,6 +207,25 @@ Ouputs send data to somewhere, i.e. they consume messages.
 
 =back
 
+=head1 THIS MODULE
+
+This is a simple L<MooseX::Getopt> script, with one input, one filter
+and one output.
+
+=head2 METHODS
+
+=head3 build_chain
+
+Builds and returns the configured chain of input => filter => output
+
+=head3 start
+
+Class method to call the run_log_server function with the results of
+having constructed an instance of this class, parsed command line options
+and constructed a chain.
+
+This is the entry point for the logstash script.
+
 =head1 AUTHOR
 
 Tomas (t0m) Doran <bobtfish at bobtfish.net>
diff --git a/lib/Log/Stash/DSL.pm b/lib/Log/Stash/DSL.pm
index c43ad07..ae15bd6 100644
--- a/lib/Log/Stash/DSL.pm
+++ b/lib/Log/Stash/DSL.pm
@@ -119,5 +119,59 @@ method), then this will be called.
 You are expected to define one or more chains, and then call the run
 function.
 
+=head2 FUNCTIONS
+
+=head3 log_chain
+
+Constructs a log chain (i.e. a series of log objects feeding into each
+other), warns about any unused parts of the chain, and returns the
+chain head (i.e. the input class).
+
+Maintains a registry / factory for the log classes, which is used to
+allow the lookup by symbolic name in the output_to key.
+
+See example in the SYNOPSIS, and details on the other functions below.
+
+=head3 output
+
+Constructs a named output within a chain.
+
+    log_chain {
+        output foo => ( class => 'STDOUT' );
+        ....
+    };
+
+=head3 filter
+
+Constructs a named filter (which can act as both an output and an input)
+within a chain.
+
+    log_chain {
+        ...
+        filter bar => ( output_to => 'stdout', class => 'Null' );
+        ...
+    };
+
+=head3 input
+
+The last thing in a chain - produces data which gets consumed.
+
+    log_chain {
+        ...
+        input zmq => ( output_to => 'bar', class => 'ZeroMQ', bind => '...' );
+        ....
+    }
+
+=head3 run_log_server
+
+This enters the event loop and causes log events to be consumed and
+processed.
+
+Can be passed a log_chain to run, although this is entirely optional
+(as all log chains which are still in scope will run when the event
+loop is entered).
+
 =cut
 
+1;
+
diff --git a/lib/Log/Stash/Role/Input.pm b/lib/Log/Stash/Role/Input.pm
index 4343b59..d5c3550 100644
--- a/lib/Log/Stash/Role/Input.pm
+++ b/lib/Log/Stash/Role/Input.pm
@@ -21,6 +21,18 @@ Log::Stash::Role::Input
 
 Produces messages.
 
+=head1 ATTRIBUTES
+
+=head2 output_to
+
+Required, must perform the L<Log::Stash::Role::Output> role.
+
+=head1 METHODS
+
+=head2 decode
+
+JSON decodes a message supplied as a parameter.
+
 =head1 SEE ALSO
 
 L<Log::Stash>

-- 
libmessage-passing-perl Debian packaging



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