CGI-MxScreen

 view release on metacpan or  search on metacpan

MxScreen/Config.pm  view on Meta::CPAN


=item logchannels

The hash ref to give to C<Log::Agent::Driver::File> via C<-channels>.
Values are printf patterns where "%s" stands for the script's basename.
This variable supersedes any setting in C<logfile>.

When an empty logchannels hash ref is given, it is interpreted as if the
following was given instead:

  {
      'error'     => "%s.err",
      'output'    => "%s.out",
      'debug'     => "%s.dbg",
  }

where "%s" stands for "$me", the basename of the script.

See L<Log::Agent::Driver::File> for more information.

=item logdebug

Sets the value of the C<-debug> flag for logconfig().  See L<Log::Agent>
for allowed values.

=item logdir

This variable is used to anchor logfiles to some directory when C<logfile>
does not specify a full path.  If unset, it defaults to ".".  Note that
when C<chdir> is used, "." is the directory where we chdir-ed to.

=item logfile

The path of the file where logging should go.  Leaving all C<logdir>,
C<logfile> and C<logchannels> empty will cause logging to go to STDERR,
which should end-up in the server's error log.

If left empty but C<logdir> was set, the value of "$me.log" is assummed,
where "$me" stands for the script's basename.  You may use "%s" in the
name to stand for "$me" (an sprintf() is called, so any % you wish to
be part of the logfile name should be written as %%).

=item loglevel

Specify the loglevel for tracing (DTRACE) when the debug mode of
C<Carp::Datum> is turned off.
Possible values are: 
emergency, alert, critical, error, warning, notice, info, debug

See L<Log::Agent> for further details.

=item logstamp

The C<Log::Agent> timestamping format to use.  Defaults to "own" when a
logfile is used, and is forced to "date" when logs are redirected to the server
logs.

=item log_backlog

The amount of backlog you wish to keep after logfile rotation.  Backlog
is never compressed, because it is currently performed synchronously
by C<Log::Agent::Rotate> and that could cause huge delays when C<log_maxsize>
is big, impacting your script response time.

Defaults to 7.

=item log_maxsize

The maximum size in bytes for the logfile.  See L<Log::Agent::Rotate>.

=item log_maxtime

The maximum time a logfile can be kept open before being rotated.
See L<Log::Agent::Rotate> for the allowed syntax.

=item log_single_host

By default, C<CGI::MxScreen> assumes nothing upon how logfiles can be accessed.
When you know they are only accessed from ONE machine, you can set this
variable to I<true>, and it will speed up locking done via C<LockFile::Simple>
during log rotations.

=item mx_buffer_stdout

When true, all regular output to STDOUT is saved away, and the context will
be emitted before any other form output (when saved within the form).  This
has a slight overhead cost since we have to copy things, but has two nice
advantages: in case of fatal errors, the regular output is not mixed with
the CGI::Carp output; and the widgets appear on their browser when the
context is already emitted, meaning that even if they press a submit button
before they have got the whole form, we'll be able to process it sanely.

Default is I<true>.

=item mx_check_vars

Boolean flag, telling whether C<CGI::MxScreen> should trap any access
to unknown keys within the screen global context (accessed through
C<$screen-E<gt>vars>) and make them fatal errors.

Default is I<true>.

=item mx_logfile

The C<CGI::MxScreen> application logfile, where the module logs what is
happening.

=item mx_loglevel

The C<CGI::MxScreen> application loglevel.  Syslog priorities are used,
and the specified level is the maximum priority logged.

Here is the list of the various things logged, and their level:

    Level   What
    ------  -------------------------------------------
    emerg   
    alert   Internal errors
    crit    Display errors
    err     Callback failures
    warn    Current state, session info



( run in 2.130 seconds using v1.01-cache-2.11-cpan-9581c071862 )