NAME
Log::Info::Fork - a process that forks, and its output is captured and logged.
SYNOPSIS
DESCRIPTION
CLASS CONSTANTS
CLASS COMPONENTS
CLASS HIGHER-LEVEL FUNCTIONS
fork_log
Fork, and log the output of the child.
- ARGUMENTS
-
- proc
-
What to execute in the child. Either as an arrayref, being the name & args of a process to execute, or as a coderef.
- fhs
-
Optional. If defined, an arrayref of hashrefs, each having keys:
- fh
-
A filehandle object, or a (non-negative) integer specifying a file descriptor.
- channel
-
Optional The channel (name) to log to. Defaults to
CHAN_INFO
. - level
-
Optional The level (name) to log at. Defaults to
LOG_INFO
.
If not defined, defaults to logging stdout to CHAN_INFO at LOG_INFO, and stderr to CHAN_INFO at LOG_WARNING.
- log_opts
-
Optional.
This value is actually a bitmask. The recognized bits are:
Log the process start/end with name (see the
name
argument). This gets logged to CHAN_INFO at LOG_INFO level.Log the process arguments (if a process passed), attempt to deparse code (if code passwd).
Log process results (as exit code if exec, or eval results if code).
- name
-
Optional A name used for messages relating to this fork.
- format
-
Optional A coderef for formatting messages. The ref is passed the following arguments:
The coderef is expected to return a string.
- RETURNS
-
The exit status for an execd process (i.e., the value of
$?
).
CLASS HIGHER-LEVEL PROCEDURES
INSTANCE CONSTRUCTION
new
Create & return a new thing.
INSTANCE COMPONENTS
INSTANCE HIGHER-LEVEL FUNCTIONS
INSTANCE HIGHER-LEVEL PROCEDURES
fork
Fork, passing any parameters to the procedure.
EXAMPLES
BUGS
REPORTING BUGS
Email the author.
AUTHOR
Martyn J. Pearce fluffy@cpan.org
COPYRIGHT
Copyright (c) 2002, 2003 Martyn J. Pearce. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 145:
You have '=item 4' instead of the expected '=item 3'