The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<html><head><title>Footprintless::Log</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >

<style type="text/css">
 <!--/*--><![CDATA[/*><!--*/
BODY {
  background: white;
  color: black;
  font-family: arial,sans-serif;
  margin: 0;
  padding: 1ex;
}

A:link, A:visited {
  background: transparent;
  color: #006699;
}

A[href="#POD_ERRORS"] {
  background: transparent;
  color: #FF0000;
}

DIV {
  border-width: 0;
}

DT {
  margin-top: 1em;
  margin-left: 1em;
}

.pod { margin-right: 20ex; }

.pod PRE     {
  background: #eeeeee;
  border: 1px solid #888888;
  color: black;
  padding: 1em;
  white-space: pre;
}

.pod H1      {
  background: transparent;
  color: #006699;
  font-size: large;
}

.pod H1 A { text-decoration: none; }
.pod H2 A { text-decoration: none; }
.pod H3 A { text-decoration: none; }
.pod H4 A { text-decoration: none; }

.pod H2      {
  background: transparent;
  color: #006699;
  font-size: medium;
}

.pod H3      {
  background: transparent;
  color: #006699;
  font-size: medium;
  font-style: italic;
}

.pod H4      {
  background: transparent;
  color: #006699;
  font-size: medium;
  font-weight: normal;
}

.pod IMG     {
  vertical-align: top;
}

.pod .toc A  {
  text-decoration: none;
}

.pod .toc LI {
  line-height: 1.2em;
  list-style-type: none;
}

  /*]]>*/-->
</style>


</head>
<body class='pod'>
<!--
  generated by Pod::Simple::HTML v3.32,
  using Pod::Simple::PullParser v3.32,
  under Perl v5.025000 at Fri Mar 16 18:51:57 2018 GMT.

 If you want to change this HTML document, you probably shouldn't do that
   by changing it directly.  Instead, see about changing the calling options
   to Pod::Simple::HTML, and/or subclassing Pod::Simple::HTML,
   then reconverting this document from the Pod source.
   When in doubt, email the author of Pod::Simple::HTML for advice.
   See 'perldoc Pod::Simple::HTML' for more info.

-->

<!-- start doc -->
<a name='___top' class='dummyTopAnchor' ></a>

<div class='indexgroup'>
<ul   class='indexList indexList1'>
  <li class='indexItem indexItem1'><a href='#NAME'>NAME</a>
  <li class='indexItem indexItem1'><a href='#VERSION'>VERSION</a>
  <li class='indexItem indexItem1'><a href='#SYNOPSIS'>SYNOPSIS</a>
  <li class='indexItem indexItem1'><a href='#DESCRIPTION'>DESCRIPTION</a>
  <li class='indexItem indexItem1'><a href='#ENTITIES'>ENTITIES</a>
  <li class='indexItem indexItem1'><a href='#CONSTRUCTORS'>CONSTRUCTORS</a>
  <ul   class='indexList indexList2'>
    <li class='indexItem indexItem2'><a href='#new(%24entity%2C_%24coordinate%2C_%25options)'>new($entity, $coordinate, %options)</a>
  </ul>
  <li class='indexItem indexItem1'><a href='#METHODS'>METHODS</a>
  <ul   class='indexList indexList2'>
    <li class='indexItem indexItem2'><a href='#cat(%25options)'>cat(%options)</a>
    <li class='indexItem indexItem2'><a href='#follow(%25options)'>follow(%options)</a>
    <li class='indexItem indexItem2'><a href='#grep(%25options)'>grep(%options)</a>
    <li class='indexItem indexItem2'><a href='#head(%25options)'>head(%options)</a>
    <li class='indexItem indexItem2'><a href='#tail(%25options)'>tail(%options)</a>
  </ul>
  <li class='indexItem indexItem1'><a href='#AUTHOR'>AUTHOR</a>
  <li class='indexItem indexItem1'><a href='#COPYRIGHT_AND_LICENSE'>COPYRIGHT AND LICENSE</a>
  <li class='indexItem indexItem1'><a href='#SEE_ALSO'>SEE ALSO</a>
</ul>
</div>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="NAME"
>NAME</a></h1>

<p>Footprintless::Log - A log manager</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="VERSION"
>VERSION</a></h1>

<p>version 1.28</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="SYNOPSIS"
>SYNOPSIS</a></h1>

<pre>    # Standard way of getting a log
    use Footprintless;
    my $log = Footprintless-&#62;new()-&#62;log();

    # Wait for a started message before proceeding
    $log-&#62;follow(until =&#62; qr/Started in \d+/); 

    # Check for errors during startup
    my $error_messages = $log-&#62;grep(options =&#62; {&#39;ERROR&#39;});</pre>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="DESCRIPTION"
>DESCRIPTION</a></h1>

<p>Provides access to read from log files.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="ENTITIES"
>ENTITIES</a></h1>

<p>A log entity can be a simple entity:</p>

<pre>    catalina =&#62; &#39;/opt/tomcat/logs/catalina.out&#39;</pre>

<p>Or it can be a hashref entity containing, at minimum, a <code>file</code> entity:</p>

<pre>    catalina =&#62; {
        file =&#62; &#39;/var/log/external/web/catalina.out&#39;,
        hostname =&#62; &#39;loghost.pastdev.com&#39;
    }</pre>

<p>All unspecified command options will be inherited (<code>hostname</code>, <code>ssh</code>, <code>sudo_username</code>, <code>username</code>) from their ancestry. Logs are commonly grouped together:</p>

<pre>    web =&#62; {
        hostname =&#62; &#39;web.pastdev.com&#39;,
        logs =&#62; {
            error =&#62; &#39;/var/log/httpd/error_log&#39;,
            access =&#62; &#39;/var/log/httpd/access_log&#39;
            catalina =&#62; {
                file =&#62; &#39;/opt/tomcat/logs/catalina.out&#39;,
                hostname =&#62; &#39;app.pastdev.com&#39;,
                sudo_username =&#62; &#39;tomcat&#39;
            }
        }
        sudo_username =&#62; &#39;apache&#39;
    }</pre>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="CONSTRUCTORS"
>CONSTRUCTORS</a></h1>

<h2><a class='u' href='#___top' title='click to go to top of document'
name="new($entity,_$coordinate,_%options)"
>new($entity, $coordinate, %options)</a></h2>

<p>Constructs a new log manager configured by the <code>$entities</code> at <code>$coordinate</code>. The supported options are:</p>

<dl>
<dt><a name="command_options_factory"
>command_options_factory</a></dt>

<dd>
<p>The command options factory to use. Defaults to an instance of <a href="http://search.cpan.org/perldoc?Footprintless%3A%3ACommandOptionsFactory" class="podlinkpod"
>Footprintless::CommandOptionsFactory</a> using the <code>localhost</code> instance of this object.</p>

<dt><a name="command_runner"
>command_runner</a></dt>

<dd>
<p>The command runner to use. Defaults to an instance of <a href="http://search.cpan.org/perldoc?Footprintless%3A%3ACommandRunner%3A%3AIPCRun" class="podlinkpod"
>Footprintless::CommandRunner::IPCRun</a>.</p>

<dt><a name="localhost"
>localhost</a></dt>

<dd>
<p>The localhost alias resolver to use. Defaults to an instance of <a href="http://search.cpan.org/perldoc?Footprintless%3A%3ALocalhost" class="podlinkpod"
>Footprintless::Localhost</a> configured with <code>load_all()</code>.</p>
</dd>
</dl>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="METHODS"
>METHODS</a></h1>

<h2><a class='u' href='#___top' title='click to go to top of document'
name="cat(%options)"
>cat(%options)</a></h2>

<p>Executes the <code>cat</code> command on this log. The available options are:</p>

<dl>
<dt><a name="options"
>options</a></dt>

<dd>
<p>Command line options passed to the <code>cat</code> command</p>
</dd>
</dl>

<h2><a class='u' href='#___top' title='click to go to top of document'
name="follow(%options)"
>follow(%options)</a></h2>

<p>Executes the <code>tail</code> command with the <code>-f</code> (follow) option and sets the command runner options to pass the <code>STDOUT</code> from tail to this <code>STDOUT</code>.</p>

<dl>
<dt><a name="runner_options"
>runner_options</a></dt>

<dd>
<p>Runner options to be passed on to the command runner.</p>

<dt><a name="until"
>until</a></dt>

<dd>
<p>The command will stop once the regex supplied is matched to the output.</p>
</dd>
</dl>

<h2><a class='u' href='#___top' title='click to go to top of document'
name="grep(%options)"
>grep(%options)</a></h2>

<p>Executes the <code>grep</code> command on this log. The available options are:</p>

<dl>
<dt><a name="options"
>options</a></dt>

<dd>
<p>Command line options passed to the <code>grep</code> command</p>
</dd>
</dl>

<h2><a class='u' href='#___top' title='click to go to top of document'
name="head(%options)"
>head(%options)</a></h2>

<p>Executes the <code>head</code> command on this log. The available options are:</p>

<dl>
<dt><a name="options"
>options</a></dt>

<dd>
<p>Command line options passed to the <code>head</code> command</p>
</dd>
</dl>

<h2><a class='u' href='#___top' title='click to go to top of document'
name="tail(%options)"
>tail(%options)</a></h2>

<p>Executes the <code>tail</code> command on this log. The available options are:</p>

<dl>
<dt><a name="options"
>options</a></dt>

<dd>
<p>Command line options passed to the <code>tail</code> command</p>
</dd>
</dl>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="AUTHOR"
>AUTHOR</a></h1>

<p>Lucas Theisen &#60;lucastheisen@pastdev.com&#62;</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="COPYRIGHT_AND_LICENSE"
>COPYRIGHT AND LICENSE</a></h1>

<p>This software is copyright (c) 2016 by Lucas Theisen.</p>

<p>This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="SEE_ALSO"
>SEE ALSO</a></h1>

<p>Please see those modules/websites for more information related to this module.</p>

<ul>
<li><a href="http://search.cpan.org/perldoc?Footprintless" class="podlinkpod"
>Footprintless</a></li>

<li><a href="http://search.cpan.org/perldoc?Config%3A%3AEntities" class="podlinkpod"
>Config::Entities</a></li>

<li><a href="http://search.cpan.org/perldoc?Footprintless" class="podlinkpod"
>Footprintless</a></li>

<li><a href="http://search.cpan.org/perldoc?Footprintless%3A%3ACommandOptionsFactory" class="podlinkpod"
>Footprintless::CommandOptionsFactory</a></li>

<li><a href="http://search.cpan.org/perldoc?Footprintless%3A%3ACommandRunner" class="podlinkpod"
>Footprintless::CommandRunner</a></li>

<li><a href="http://search.cpan.org/perldoc?Footprintless%3A%3ALocalhost" class="podlinkpod"
>Footprintless::Localhost</a></li>
</ul>

<!-- end doc -->

</body></html>