The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

pye - Inspect logs generated by Pye

VERSION

version 1.000000

SYNOPSIS

In the command line:

        # show list of latest 10 sessions
        $ pye

        # show complete log for a specific session ID (say "123")
        $ pye -S 123

        # log a message for a specific session ID (say "123") with complex data
        $ pye -S 123 -m "some log message" -D '{ "some": "data" }'
 

DESCRIPTION

pye is a command line utility for reading and inspecting logs generated by the Pye module.

It allows viewing sessions in the log, reading the entire log of a session, and even adding messages and data to the log.

If you're using Pye to save logs from more than one application on a server, I find it useful to create aliases to pye with different options to quickly inspect the log for every application. For example, say I have an application called "myapp", and another one called "myscript", which save logs to the same database, but in different collections. I might create the following bash aliases:

        alias myapp='pye -d logs -l myapp_logs -s myapp_sessions'
        alias myscript='pye -d logs -l myscript_logs -s myscript_sessions'

OPTIONS

-H, --host

The MongoDB database host. Defaults to "localhost".

-p, --port

The MongoDB database port. Defaults to 27017.

-d, --database

The name of the database. Defaults to "logs".

-l, --log_coll

The name of the collection where log messages are stored. Defaults to "logs".

-s, --session_coll

The name of the collection where session data is stored. Defaults to "sessions".

-S, --session_id

The session ID to display or log a message for. Optional.

-m, --message

The message to log to the database (requires session ID to be supplied too). Optional.

-D, --data

A JSON structure to attach to the message. Optional.

SEE ALSO

Pye

BUGS AND LIMITATIONS

Please report any bugs or feature requests to bug-Pye@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Pye.

SUPPORT

You can find documentation for this module by invoking it with the -h switch:

        pye -h
 

AUTHOR

Ido Perlmuter <ido@ido50.net>

LICENSE AND COPYRIGHT

Copyright (c) 2013, Ido Perlmuter ido@ido50.net.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either version 5.8.1 or any later version. See perlartistic and perlgpl.

The full text of the license can be found in the LICENSE file included with this module.

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.