来自 Log4Perl 的额外日志
Extra Logs from Log4Perl
我正在使用 Log4Perl 模块进行日志记录。当我 运行 应用程序时,我在控制台上收到一些 Log4Perl 模块日志:
Subroutine import redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 76.
Subroutine initialized redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 214.
Subroutine new redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 220.
Subroutine reset redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 227.
Subroutine init_once redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 234.
Subroutine init redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 241.
Subroutine init_and_watch redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 255.
Subroutine easy_init redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 270.
Subroutine wrapper_register redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 348.
Subroutine get_logger redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 356.
Subroutine caller_depth_offset redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 398.
Subroutine appenders redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 418.
Subroutine add_appender redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 424.
Subroutine appender_thresholds_adjust redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 439.
Subroutine appender_by_name redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 484.
Subroutine eradicate_appender redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 502.
Subroutine infiltrate_lwp redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 510.
Subroutine easy_closure_create redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 531.
Subroutine easy_closure_cleanup redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 545.
Subroutine easy_closure_category_cleanup redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 562.
Subroutine easy_closure_global_cleanup redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 578.
Subroutine easy_closure_logger_remove redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 587.
Subroutine remove_logger redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 602.
我不知道他们为什么要来。我也尝试了各种日志级别,但我仍然得到这些。
是Log::Log4perl
不是Log::Log4Perl
。
If you're on Windows and are getting warning messages like
Constant subroutine Log::Log4perl::_INTERNAL_DEBUG redefined at
C:/Programme/Perl/lib/constant.pm line 103. Subroutine import redefined at
C:/Programme/Perl/site/lib/Log/Log4Perl.pm line 69. Subroutine initialized redefined at
C:/Programme/Perl/site/lib/Log/Log4Perl.pm line 207.
then chances are that you're using 'Log::Log4Perl' (wrong uppercase P) instead of
the correct 'Log::Log4perl'. Perl on Windows doesn't handle this error
well and spits out a slew of confusing warning messages. But now you
know, just use the correct module name and you'll be fine.
另请查看此 rt:https://rt.cpan.org/Public/Bug/Display.html?id=23890
我正在使用 Log4Perl 模块进行日志记录。当我 运行 应用程序时,我在控制台上收到一些 Log4Perl 模块日志:
Subroutine import redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 76.
Subroutine initialized redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 214.
Subroutine new redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 220.
Subroutine reset redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 227.
Subroutine init_once redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 234.
Subroutine init redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 241.
Subroutine init_and_watch redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 255.
Subroutine easy_init redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 270.
Subroutine wrapper_register redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 348.
Subroutine get_logger redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 356.
Subroutine caller_depth_offset redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 398.
Subroutine appenders redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 418.
Subroutine add_appender redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 424.
Subroutine appender_thresholds_adjust redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 439.
Subroutine appender_by_name redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 484.
Subroutine eradicate_appender redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 502.
Subroutine infiltrate_lwp redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 510.
Subroutine easy_closure_create redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 531.
Subroutine easy_closure_cleanup redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 545.
Subroutine easy_closure_category_cleanup redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 562.
Subroutine easy_closure_global_cleanup redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 578.
Subroutine easy_closure_logger_remove redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 587.
Subroutine remove_logger redefined at C:/Strawberry/perl/site/lib/LOG/Log4perl.pm line 602.
我不知道他们为什么要来。我也尝试了各种日志级别,但我仍然得到这些。
是Log::Log4perl
不是Log::Log4Perl
。
If you're on Windows and are getting warning messages like
Constant subroutine Log::Log4perl::_INTERNAL_DEBUG redefined at C:/Programme/Perl/lib/constant.pm line 103. Subroutine import redefined at C:/Programme/Perl/site/lib/Log/Log4Perl.pm line 69. Subroutine initialized redefined at C:/Programme/Perl/site/lib/Log/Log4Perl.pm line 207.
then chances are that you're using 'Log::Log4Perl' (wrong uppercase P) instead of the correct 'Log::Log4perl'. Perl on Windows doesn't handle this error well and spits out a slew of confusing warning messages. But now you know, just use the correct module name and you'll be fine.
另请查看此 rt:https://rt.cpan.org/Public/Bug/Display.html?id=23890