403Webshell
Server IP : 103.119.228.120  /  Your IP : 3.133.157.231
Web Server : Apache
System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User : nobody ( 99)
PHP Version : 5.6.40
Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime
MySQL : ON |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : ON |  Pkexec : ON
Directory :  /usr/local/share/man/man3/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/local/share/man/man3/Log::Log4perl::Appender::File.3pm
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{
.    if \nF \{
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "Appender::File 3"
.TH Appender::File 3 "2015-04-19" "perl v5.16.3" "User Contributed Perl Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
Log::Log4perl::Appender::File \- Log to file
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\&    use Log::Log4perl::Appender::File;
\&
\&    my $app = Log::Log4perl::Appender::File\->new(
\&      filename  => \*(Aqfile.log\*(Aq,
\&      mode      => \*(Aqappend\*(Aq,
\&      autoflush => 1,
\&      umask     => 0222,
\&    );
\&
\&    $file\->log(message => "Log me\en");
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
This is a simple appender for writing to a file.
.PP
The \f(CW\*(C`log()\*(C'\fR method takes a single scalar. If a newline character
should terminate the message, it has to be added explicitly.
.PP
Upon destruction of the object, the filehandle to access the
file is flushed and closed.
.PP
If you want to switch over to a different logfile, use the
\&\f(CW\*(C`file_switch($newfile)\*(C'\fR method which will first close the old
file handle and then open a one to the new file specified.
.SS "\s-1OPTIONS\s0"
.IX Subsection "OPTIONS"
.IP "filename" 4
.IX Item "filename"
Name of the log file.
.IP "mode" 4
.IX Item "mode"
Messages will be append to the file if \f(CW$mode\fR is set to the
string \f(CW"append"\fR. Will clobber the file
if set to \f(CW"clobber"\fR. If it is \f(CW"pipe"\fR, the file will be understood
as executable to pipe output to. Default mode is \f(CW"append"\fR.
.IP "autoflush" 4
.IX Item "autoflush"
\&\f(CW\*(C`autoflush\*(C'\fR, if set to a true value, triggers flushing the data
out to the file on every call to \f(CW\*(C`log()\*(C'\fR. \f(CW\*(C`autoflush\*(C'\fR is on by default.
.IP "syswrite" 4
.IX Item "syswrite"
\&\f(CW\*(C`syswrite\*(C'\fR, if set to a true value, makes sure that the appender uses
\&\fIsyswrite()\fR instead of \fIprint()\fR to log the message. \f(CW\*(C`syswrite()\*(C'\fR usually
maps to the operating system's \f(CW\*(C`write()\*(C'\fR function and makes sure that
no other process writes to the same log file while \f(CW\*(C`write()\*(C'\fR is busy.
Might safe you from having to use other synchronisation measures like
semaphores (see: Synchronized appender).
.IP "umask" 4
.IX Item "umask"
Specifies the \f(CW\*(C`umask\*(C'\fR to use when creating the file, determining
the file's permission settings.
If set to \f(CW0022\fR (default), new
files will be created with \f(CW\*(C`rw\-r\-\-r\-\-\*(C'\fR permissions.
If set to \f(CW0000\fR, new files will be created with \f(CW\*(C`rw\-rw\-rw\-\*(C'\fR permissions.
.IP "owner" 4
.IX Item "owner"
If set, specifies that the owner of the newly created log file should
be different from the effective user id of the running process.
Only makes sense if the process is running as root.
Both numerical user ids and user names are acceptable.
Log4perl does not attempt to change the ownership of \fIexisting\fR files.
.IP "group" 4
.IX Item "group"
If set, specifies that the group of the newly created log file should
be different from the effective group id of the running process.
Only makes sense if the process is running as root.
Both numerical group ids and group names are acceptable.
Log4perl does not attempt to change the group membership of \fIexisting\fR files.
.IP "utf8" 4
.IX Item "utf8"
If you're printing out Unicode strings, the output filehandle needs
to be set into \f(CW\*(C`:utf8\*(C'\fR mode:
.Sp
.Vb 5
\&    my $app = Log::Log4perl::Appender::File\->new(
\&      filename  => \*(Aqfile.log\*(Aq,
\&      mode      => \*(Aqappend\*(Aq,
\&      utf8      => 1,
\&    );
.Ve
.IP "binmode" 4
.IX Item "binmode"
To manipulate the output filehandle via \f(CW\*(C`binmode()\*(C'\fR, use the
binmode parameter:
.Sp
.Vb 5
\&    my $app = Log::Log4perl::Appender::File\->new(
\&      filename  => \*(Aqfile.log\*(Aq,
\&      mode      => \*(Aqappend\*(Aq,
\&      binmode   => ":utf8",
\&    );
.Ve
.Sp
A setting of \*(L":utf8\*(R" for \f(CW\*(C`binmode\*(C'\fR is equivalent to specifying
the \f(CW\*(C`utf8\*(C'\fR option (see above).
.IP "recreate" 4
.IX Item "recreate"
Normally, if a file appender logs to a file and the file gets moved to
a different location (e.g. via \f(CW\*(C`mv\*(C'\fR), the appender's open file handle
will automatically follow the file to the new location.
.Sp
This may be undesirable. When using an external logfile rotator,
for example, the appender should create a new file under the old name
and start logging into it. If the \f(CW\*(C`recreate\*(C'\fR option is set to a true value,
\&\f(CW\*(C`Log::Log4perl::Appender::File\*(C'\fR will do exactly that. It defaults to
false. Check the \f(CW\*(C`recreate_check_interval\*(C'\fR option for performance
optimizations with this feature.
.IP "recreate_check_interval" 4
.IX Item "recreate_check_interval"
In \f(CW\*(C`recreate\*(C'\fR mode, the appender has to continuously check if the
file it is logging to is still in the same location. This check is
fairly expensive, since it has to call \f(CW\*(C`stat\*(C'\fR on the file name and
figure out if its inode has changed. Doing this with every call
to \f(CW\*(C`log\*(C'\fR can be prohibitively expensive. Setting it to a positive
integer value N will only check the file every N seconds. It defaults to 30.
.Sp
This obviously means that the appender will continue writing to
a moved file until the next check occurs, in the worst case
this will happen \f(CW\*(C`recreate_check_interval\*(C'\fR seconds after the file
has been moved or deleted. If this is undesirable,
setting \f(CW\*(C`recreate_check_interval\*(C'\fR to 0 will have the
appender check the file with \fIevery\fR call to \f(CW\*(C`log()\*(C'\fR.
.IP "recreate_check_signal" 4
.IX Item "recreate_check_signal"
In \f(CW\*(C`recreate\*(C'\fR mode, if this option is set to a signal name
(e.g. \*(L"\s-1USR1\*(R"\s0), the appender will recreate a missing logfile
when it receives the signal. It uses less resources than constant
polling. The usual limitation with perl's signal handling apply.
Check the \s-1FAQ\s0 for using this option with the log rotating
utility \f(CW\*(C`newsyslog\*(C'\fR.
.IP "recreate_pid_write" 4
.IX Item "recreate_pid_write"
The popular log rotating utility \f(CW\*(C`newsyslog\*(C'\fR expects a pid file
in order to send the application a signal when its logs have
been rotated. This option expects a path to a file where the pid
of the currently running application gets written to.
Check the \s-1FAQ\s0 for using this option with the log rotating
utility \f(CW\*(C`newsyslog\*(C'\fR.
.IP "create_at_logtime" 4
.IX Item "create_at_logtime"
The file appender typically creates its logfile in its constructor, i.e.
at Log4perl \f(CW\*(C`init()\*(C'\fR time. This is desirable for most use cases, because
it makes sure that file permission problems get detected right away, and
not after days/weeks/months of operation when the appender suddenly needs
to log something and fails because of a problem that was obvious at
startup.
.Sp
However, there are rare use cases where the file shouldn't be created
at Log4perl \f(CW\*(C`init()\*(C'\fR time, e.g. if the appender can't be used by the current
user although it is defined in the configuration file. If you set
\&\f(CW\*(C`create_at_logtime\*(C'\fR to a true value, the file appender will try to create
the file at log time. Note that this setting lets permission problems
sit undetected until log time, which might be undesirable.
.IP "header_text" 4
.IX Item "header_text"
If you want Log4perl to print a header into every newly opened
(or re-opened) logfile, set \f(CW\*(C`header_text\*(C'\fR to either a string
or a subroutine returning a string. If the message doesn't have a newline,
a newline at the end of the header will be provided.
.IP "mkpath" 4
.IX Item "mkpath"
If this this option is set to true,
the directory path will be created if it does not exist yet.
.IP "mkpath_umask" 4
.IX Item "mkpath_umask"
Specifies the \f(CW\*(C`umask\*(C'\fR to use when creating the directory, determining
the directory's permission settings.
If set to \f(CW0022\fR (default), new
directory will be created with \f(CW\*(C`rwxr\-xr\-x\*(C'\fR permissions.
If set to \f(CW0000\fR, new directory will be created with \f(CW\*(C`rwxrwxrwx\*(C'\fR permissions.
.PP
Design and implementation of this module has been greatly inspired by
Dave Rolsky's \f(CW\*(C`Log::Dispatch\*(C'\fR appender framework.
.SH "LICENSE"
.IX Header "LICENSE"
Copyright 2002\-2013 by Mike Schilli <m@perlmeister.com>
and Kevin Goess <cpan@goess.org>.
.PP
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
.SH "AUTHOR"
.IX Header "AUTHOR"
Please contribute patches to the project on Github:
.PP
.Vb 1
\&    http://github.com/mschilli/log4perl
.Ve
.PP
Send bug reports or requests for enhancements to the authors via our
.PP
\&\s-1MAILING LIST \s0(questions, bug reports, suggestions/patches):
log4perl\-devel@lists.sourceforge.net
.PP
Authors (please contact them via the list above, not directly):
Mike Schilli <m@perlmeister.com>,
Kevin Goess <cpan@goess.org>
.PP
Contributors (in alphabetical order):
Ateeq Altaf, Cory Bennett, Jens Berthold, Jeremy Bopp, Hutton
Davidson, Chris R. Donnelly, Matisse Enzer, Hugh Esco, Anthony
Foiani, James FitzGibbon, Carl Franks, Dennis Gregorovic, Andy
Grundman, Paul Harrington, Alexander Hartmaier  David Hull,
Robert Jacobson, Jason Kohles, Jeff Macdonald, Markus Peter,
Brett Rann, Peter Rabbitson, Erik Selberg, Aaron Straup Cope,
Lars Thegler, David Viner, Mac Yang.

Youez - 2016 - github.com/yon3zu
LinuXploit