DRVTiny

ae_warn.pl

Jun 26th, 2020
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.51 KB | None | 0 0
  1. #!/usr/bin/perl
  2. package CORE::GLOBAL;
  3.  
  4. use subs qw(warn);
  5. use AnyEvent;
  6. use AnyEvent::Log;
  7. BEGIN {
  8.     $ENV{'PERL_ANYEVENT_VERBOSE'} = 7;
  9.     AnyEvent::Log::ctx->level('info');
  10.     $AnyEvent::Log::FILTER->level ('info');
  11. }
  12.  
  13. sub warn {
  14.     AE::log error => join('' => @_)
  15. }
  16.  
  17. package main;
  18. use AnyEvent;
  19. use AnyEvent::Log;
  20.  
  21. BEGIN { AnyEvent::Log::ctx->level('info') }
  22. AnyEvent::Log::ctx->level('info');
  23. $AnyEvent::Log::FILTER->level ('info');
  24. #warn 'hello';
  25. AE::log info => 'message!';
  26. #AE::cv->recv;
Add Comment
Please, Sign In to add comment