… | |
… | |
6 | |
6 | |
7 | Simple uses: |
7 | Simple uses: |
8 | |
8 | |
9 | use AnyEvent; |
9 | use AnyEvent; |
10 | |
10 | |
11 | AE::log fatal => "no config found, cannot continue"; # never returns |
11 | AE::log fatal => "No config found, cannot continue!"; # never returns |
12 | AE::log alert => "the battery died"; |
12 | AE::log alert => "The battery died!"; |
13 | AE::log crit => "the battery temperature is too hot"; |
13 | AE::log crit => "The battery temperature is too hot!"; |
14 | AE::log error => "division by zero attempted"; |
14 | AE::log error => "Division by zero attempted."; |
15 | AE::log warn => "couldn't delete the file"; |
15 | AE::log warn => "Couldn't delete the file."; |
16 | AE::log note => "wanted to create config, but config already exists"; |
16 | AE::log note => "Wanted to create config, but config already exists."; |
17 | AE::log info => "file soandso successfully deleted"; |
17 | AE::log info => "File soandso successfully deleted."; |
18 | AE::log debug => "the function returned 3"; |
18 | AE::log debug => "the function returned 3"; |
19 | AE::log trace => "going to call function abc"; |
19 | AE::log trace => "going to call function abc"; |
20 | |
20 | |
21 | Log level overview: |
21 | Log level overview: |
22 | |
22 | |
… | |
… | |
1292 | if (/\G(.+)/g) { |
1292 | if (/\G(.+)/g) { |
1293 | die "PERL_ANYEVENT_LOG ($spec): parse error at '$1'\n"; |
1293 | die "PERL_ANYEVENT_LOG ($spec): parse error at '$1'\n"; |
1294 | } |
1294 | } |
1295 | } |
1295 | } |
1296 | |
1296 | |
1297 | 1; |
|
|
1298 | |
|
|
1299 | =head1 EXAMPLES |
1297 | =head1 EXAMPLES |
1300 | |
1298 | |
1301 | This section shows some common configurations, both as code, and as |
1299 | This section shows some common configurations, both as code, and as |
1302 | C<PERL_ANYEVENT_LOG> string. |
1300 | C<PERL_ANYEVENT_LOG> string. |
1303 | |
1301 | |
… | |
… | |
1383 | Marc Lehmann <schmorp@schmorp.de> |
1381 | Marc Lehmann <schmorp@schmorp.de> |
1384 | http://home.schmorp.de/ |
1382 | http://home.schmorp.de/ |
1385 | |
1383 | |
1386 | =cut |
1384 | =cut |
1387 | |
1385 | |
|
|
1386 | 1 |
|
|
1387 | |