Edit D:\app\Administrator\product\11.2.0\dbhome_1\perl\html\lib\Log\Message\Simple.html
<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>../lib/Log/Message/Simple.pm</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link rev="made" href="mailto:" /> </head> <body style="background-color: white"> <table border="0" width="100%" cellspacing="0" cellpadding="3"> <tr><td class="block" style="background-color: #cccccc" valign="middle"> <big><strong><span class="block"> ../lib/Log/Message/Simple.pm</span></strong></big> </td></tr> </table> <!-- INDEX BEGIN --> <div name="index"> <p><a name="__index__"></a></p> <ul> <li><a href="#name">NAME</a></li> <li><a href="#synopsis">SYNOPSIS</a></li> <li><a href="#description">DESCRIPTION</a></li> <li><a href="#functions">FUNCTIONS</a></li> <ul> <li><a href="#msg_message_string___verbose__">msg("message string" [,VERBOSE])</a></li> <li><a href="#debug_message_string___verbose__">debug("message string" [,VERBOSE])</a></li> <li><a href="#error_error_string___verbose__">error("error string" [,VERBOSE])</a></li> <li><a href="#carp___"><code>carp()</code>;</a></li> <li><a href="#croak___"><code>croak()</code>;</a></li> <li><a href="#confess___"><code>confess()</code>;</a></li> <li><a href="#cluck___"><code>cluck()</code>;</a></li> </ul> <li><a href="#class_methods">CLASS METHODS</a></li> <ul> <li><a href="#log__message__simple__stack__">Log::Message::Simple-><code>stack()</code></a></li> <li><a href="#log__message__simple__stack_as_string__trace__">Log::Message::Simple->stack_as_string([TRACE])</a></li> <li><a href="#log__message__simple__flush__">Log::Message::Simple-><code>flush()</code></a></li> </ul> <li><a href="#global_variables">GLOBAL VARIABLES</a></li> </ul> <hr name="index" /> </div> <!-- INDEX END --> <p> </p> <hr /> <h1><a name="name">NAME</a></h1> <p>Log::Message::Simple</p> <p> </p> <hr /> <h1><a name="synopsis">SYNOPSIS</a></h1> <pre> use Log::Message::Simple qw[msg error debug carp croak cluck confess];</pre> <pre> use Log::Message::Simple qw[:STD :CARP];</pre> <pre> ### standard reporting functionality msg( "Connecting to database", $verbose ); error( "Database connection failed: $@", $verbose ); debug( "Connection arguments were: $args", $debug );</pre> <pre> ### standard carp functionality carp( "Wrong arguments passed: @_" ); croak( "Fatal: wrong arguments passed: @_" ); cluck( "Wrong arguments passed -- including stacktrace: @_" ); confess("Fatal: wrong arguments passed -- including stacktrace: @_" );</pre> <pre> ### retrieve individual message my @stack = Log::Message::Simple->stack; my @stack = Log::Message::Simple->flush;</pre> <pre> ### retrieve the entire stack in printable form my $msgs = Log::Message::Simple->stack_as_string; my $trace = Log::Message::Simple->stack_as_string(1);</pre> <pre> ### redirect output local $Log::Message::Simple::MSG_FH = \*STDERR; local $Log::Message::Simple::ERROR_FH = \*STDERR; local $Log::Message::Simple::DEBUG_FH = \*STDERR; ### force a stacktrace on error local $Log::Message::Simple::STACKTRACE_ON_ERROR = 1</pre> <p> </p> <hr /> <h1><a name="description">DESCRIPTION</a></h1> <p>This module provides standardized logging facilities using the <code>Log::Message</code> module.</p> <p> </p> <hr /> <h1><a name="functions">FUNCTIONS</a></h1> <p> </p> <h2><a name="msg_message_string___verbose__">msg("message string" [,VERBOSE])</a></h2> <p>Records a message on the stack, and prints it to <code>STDOUT</code> (or actually <a href="#_msg_fh"><code>$MSG_FH</code></a>, see the <code>GLOBAL VARIABLES</code> section below), if the <code>VERBOSE</code> option is true. The <code>VERBOSE</code> option defaults to false.</p> <p>Exported by default, or using the <code>:STD</code> tag.</p> <p> </p> <h2><a name="debug_message_string___verbose__">debug("message string" [,VERBOSE])</a></h2> <p>Records a debug message on the stack, and prints it to <code>STDOUT</code> (or actually <a href="#_debug_fh"><code>$DEBUG_FH</code></a>, see the <code>GLOBAL VARIABLES</code> section below), if the <code>VERBOSE</code> option is true. The <code>VERBOSE</code> option defaults to false.</p> <p>Exported by default, or using the <code>:STD</code> tag.</p> <p> </p> <h2><a name="error_error_string___verbose__">error("error string" [,VERBOSE])</a></h2> <p>Records an error on the stack, and prints it to <code>STDERR</code> (or actually <a href="#_error_fh"><code>$ERROR_FH</code></a>, see the <code>GLOBAL VARIABLES</code> sections below), if the <code>VERBOSE</code> option is true. The <code>VERBOSE</code> options defaults to true.</p> <p>Exported by default, or using the <code>:STD</code> tag.</p> <p> </p> <h2><a name="carp___"><code>carp()</code>;</a></h2> <p>Provides functionality equal to <code>Carp::carp()</code> while still logging to the stack.</p> <p>Exported by using the <code>:CARP</code> tag.</p> <p> </p> <h2><a name="croak___"><code>croak()</code>;</a></h2> <p>Provides functionality equal to <code>Carp::croak()</code> while still logging to the stack.</p> <p>Exported by using the <code>:CARP</code> tag.</p> <p> </p> <h2><a name="confess___"><code>confess()</code>;</a></h2> <p>Provides functionality equal to <code>Carp::confess()</code> while still logging to the stack.</p> <p>Exported by using the <code>:CARP</code> tag.</p> <p> </p> <h2><a name="cluck___"><code>cluck()</code>;</a></h2> <p>Provides functionality equal to <code>Carp::cluck()</code> while still logging to the stack.</p> <p>Exported by using the <code>:CARP</code> tag.</p> <p> </p> <hr /> <h1><a name="class_methods">CLASS METHODS</a></h1> <p> </p> <h2><a name="log__message__simple__stack__">Log::Message::Simple-><code>stack()</code></a></h2> <p>Retrieves all the items on the stack. Since <code>Log::Message::Simple</code> is implemented using <code>Log::Message</code>, consult its manpage for the function <code>retrieve</code> to see what is returned and how to use the items.</p> <p> </p> <h2><a name="log__message__simple__stack_as_string__trace__">Log::Message::Simple->stack_as_string([TRACE])</a></h2> <p>Returns the whole stack as a printable string. If the <code>TRACE</code> option is true all items are returned with <code>Carp::longmess</code> output, rather than just the message. <code>TRACE</code> defaults to false.</p> <p> </p> <h2><a name="log__message__simple__flush__">Log::Message::Simple-><code>flush()</code></a></h2> <p>Removes all the items from the stack and returns them. Since <code>Log::Message::Simple</code> is implemented using <code>Log::Message</code>, consult its manpage for the function <code>retrieve</code> to see what is returned and how to use the items.</p> <p> </p> <hr /> <h1><a name="global_variables">GLOBAL VARIABLES</a></h1> <dl> <dt><strong><a name="_error_fh" class="item">$ERROR_FH</a></strong> <dd> <p>This is the filehandle all the messages sent to <code>error()</code> are being printed. This defaults to <code>*STDERR</code>.</p> </dd> </li> <dt><strong><a name="_msg_fh" class="item">$MSG_FH</a></strong> <dd> <p>This is the filehandle all the messages sent to <code>msg()</code> are being printed. This default to <code>*STDOUT</code>.</p> </dd> </li> <dt><strong><a name="_debug_fh" class="item">$DEBUG_FH</a></strong> <dd> <p>This is the filehandle all the messages sent to <code>debug()</code> are being printed. This default to <code>*STDOUT</code>.</p> </dd> </li> <dt><strong><a name="_stacktrace_on_error" class="item">$STACKTRACE_ON_ERROR</a></strong> <dd> <p>If this option is set to <code>true</code>, every call to <code>error()</code> will generate a stacktrace using <code>Carp::shortmess()</code>. Defaults to <code>false</code></p> </dd> </dl> <table border="0" width="100%" cellspacing="0" cellpadding="3"> <tr><td class="block" style="background-color: #cccccc" valign="middle"> <big><strong><span class="block"> ../lib/Log/Message/Simple.pm</span></strong></big> </td></tr> </table> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de