--- AnyEvent/lib/AnyEvent.pm 2011/08/25 23:20:17 1.377 +++ AnyEvent/lib/AnyEvent.pm 2011/09/01 23:46:26 1.382 @@ -880,7 +880,7 @@ AnyEvent::Impl::Irssi used when running within irssi. AnyEvent::Impl::IOAsync based on IO::Async. AnyEvent::Impl::Cocoa based on Cocoa::EventLoop. - AnyEvent::Impl::FLTK2 based on FLTK (fltk 2 binding). + AnyEvent::Impl::FLTK based on FLTK (fltk 2 binding). =item Backends with special needs. @@ -1060,7 +1060,9 @@ load AnyEvent::Log and call C - consequently, look at the L documentation for details. -If the test fails it will simply return. +If the test fails it will simply return. Right now this happens when a +numerical loglevel is used and it is larger than the level specified via +C<$ENV{PERL_ANYEVENT_VERBOSE}>. If you want to sprinkle loads of logging calls around your code, consider creating a logger callback with the C function, @@ -1235,14 +1237,13 @@ use Carp (); -our $VERSION = '6.01'; +our $VERSION = '6.02'; our $MODEL; - our @ISA; - our @REGISTRY; - our $VERBOSE; +our $MAX_SIGNAL_LATENCY = 10; +our %PROTOCOL; # (ipv4|ipv6) => (1|2), higher numbers are preferred BEGIN { require "AnyEvent/constants.pl"; @@ -1258,14 +1259,10 @@ @ENV{grep /^PERL_ANYEVENT_/, keys %ENV} = () if ${^TAINT}; - $VERBOSE = $ENV{PERL_ANYEVENT_VERBOSE}*1; -} + # $ENV{PERL_ANYEVENT_xxx} now valid -our $MAX_SIGNAL_LATENCY = 10; - -our %PROTOCOL; # (ipv4|ipv6) => (1|2), higher numbers are preferred + $VERBOSE = length $ENV{PERL_ANYEVENT_VERBOSE} ? $ENV{PERL_ANYEVENT_VERBOSE}*1 : 3; -{ my $idx; $PROTOCOL{$_} = ++$idx for reverse split /\s*,\s*/, @@ -1338,7 +1335,7 @@ [Prima:: => AnyEvent::Impl::POE::], [IO::Async::Loop:: => AnyEvent::Impl::IOAsync::], # a bitch to autodetect [Cocoa::EventLoop:: => AnyEvent::Impl::Cocoa::], - [FLTK:: => AnyEvent::Impl::FLTK2::], + [FLTK:: => AnyEvent::Impl::FLTK::], ); our @isa_hook; @@ -2042,16 +2039,22 @@ =item C -By default, AnyEvent will be completely silent except in fatal -conditions. You can set this environment variable to make AnyEvent more -talkative. If you want to do more than just set the global logging level +By default, AnyEvent will only log messages with loglevel C<3> +(C) or higher (see L). You can set this +environment variable to a numerical loglevel to make AnyEvent more (or +less) talkative. + +If you want to do more than just set the global logging level you should have a look at C, which allows much more complex specifications. -When set to C<5> or higher (warn), causes AnyEvent to warn about unexpected -conditions, such as not being able to load the event model specified by -C, or a guard callback throwing an exception - this -is the minimum recommended level. +When set to C<0> (C), then no messages whatsoever will be logged with +the default logging settings. + +When set to C<5> or higher (C), causes AnyEvent to warn about +unexpected conditions, such as not being able to load the event model +specified by C, or a guard callback throwing an +exception - this is the minimum recommended level. When set to C<7> or higher (info), cause AnyEvent to report which event model it chooses.