ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent/Log.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent/Log.pm (file contents):
Revision 1.31 by root, Thu Aug 25 03:08:48 2011 UTC vs.
Revision 1.32 by root, Thu Aug 25 04:56:16 2011 UTC

1012Configures the context to log to a file with the given path. Works like 1012Configures the context to log to a file with the given path. Works like
1013C<log_to_path>. 1013C<log_to_path>.
1014 1014
1015=item C<syslog> or C<syslog=>I<expr> 1015=item C<syslog> or C<syslog=>I<expr>
1016 1016
1017Configured the context to log to syslog. If I<expr> is given, then it is 1017Configures the context to log to syslog. If I<expr> is given, then it is
1018evaluated in the L<Sys::Syslog> package, so you could use: 1018evaluated in the L<Sys::Syslog> package, so you could use:
1019 1019
1020 log=syslog=LOG_LOCAL0 1020 log=syslog=LOG_LOCAL0
1021 1021
1022=item C<nolog> 1022=item C<nolog>
1064 filter=warn 1064 filter=warn
1065 1065
1066 # or, more verbose 1066 # or, more verbose
1067 filter=only,level,warn 1067 filter=only,level,warn
1068 1068
1069=item C<1>..C<9>, a logging level name (C<error>, C<debug> etc.) 1069=item C<1>..C<9> or a logging level name (C<error>, C<debug> etc.)
1070 1070
1071A numeric loglevel or the name of a loglevel will be interpreted according 1071A numeric loglevel or the name of a loglevel will be interpreted according
1072to the most recent C<only>, C<except> or C<level> directive. By default, 1072to the most recent C<only>, C<except> or C<level> directive. By default,
1073specifying a logging level enables that and any higher priority messages. 1073specifying a logging level enables that and any higher priority messages.
1074 1074
1075=item C<+>I<context> 1075=item C<+>I<context>
1076 1076
1077Adds/attaches the named context as slave to the context. 1077Attaches the named context as slave to the context.
1078 1078
1079=item C<+> 1079=item C<+>
1080 1080
1081A line C<+> clears the slave list form the context. Anonymous (C<%name>) 1081A line C<+> detaches all contexts, i.e. clears the slave list from the
1082contexts have no slaves by default, but package contexts have the parent 1082context. Anonymous (C<%name>) contexts have no attached slaves by default,
1083context as slave by default. 1083but package contexts have the parent context as slave by default.
1084 1084
1085Example: log messages from My::Module to a file, do not send them to the 1085Example: log messages from My::Module to a file, do not send them to the
1086default log collector. 1086default log collector.
1087 1087
1088 My::Module=+,file=/tmp/mymodulelog 1088 My::Module=+,file=/tmp/mymodulelog

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines