Attached Files | log4perl.patch [^] (4,162 bytes) 2011-03-10 16:44 [Show Content] [Hide Content]#
# old_revision [d495f2846778804f5bbe5fd9647de39dfb4aec76]
#
# patch "pf/lib/pf/WebAPI.pm"
# from [71cea0df063d4a2c7aeaa2f14fd42fcf3b127e41]
# to [82e6064ab5fee01e367bbc03be795e8185d9479e]
#
# patch "pf/sbin/pfdetect"
# from [af89b91c74b82afad5bdadbc6b5209b1a74c3476]
# to [add2c4d726e13910df49276a08ce9d1e164f2432]
#
# patch "pf/sbin/pfdhcplistener"
# from [3613f4c25e8dca07738ba03070e018146ae5f540]
# to [469311171a4d51241ddd0d72951774c16d3ab7c7]
#
# patch "pf/sbin/pfmon"
# from [75af6cfee8308c452c6935d8a5916e7bfc72d986]
# to [a896c3e84532d84214ad2e9ed4cf7a2d9da7fac4]
#
# patch "pf/sbin/pfredirect"
# from [9d3cd0b2adb55bafa62c155c726a632becde71e2]
# to [f5dff5e3c935228e32fdf42cd3511ee65e983008]
#
# patch "pf/sbin/pfsetvlan"
# from [719d214cc8ef1392eebfec2aded025c4d06f551c]
# to [ba345d6ffd9f5270401f550759d023dd19581548]
#
============================================================
--- pf/sbin/pfdetect af89b91c74b82afad5bdadbc6b5209b1a74c3476
+++ pf/sbin/pfdetect add2c4d726e13910df49276a08ce9d1e164f2432
@@ -37,7 +37,7 @@ use pf::person;
use pf::os;
use pf::person;
-Log::Log4perl->init( INSTALL_DIR . "/conf/log.conf" );
+Log::Log4perl->init_and_watch( INSTALL_DIR . "/conf/log.conf", 60 );
my $logger = Log::Log4perl->get_logger( basename($0) );
Log::Log4perl::MDC->put( 'proc', basename($0) );
Log::Log4perl::MDC->put( 'tid', 0 );
============================================================
--- pf/sbin/pfdhcplistener 3613f4c25e8dca07738ba03070e018146ae5f540
+++ pf/sbin/pfdhcplistener 469311171a4d51241ddd0d72951774c16d3ab7c7
@@ -43,7 +43,7 @@ use pf::violation;
use pf::util;
use pf::violation;
-Log::Log4perl->init( INSTALL_DIR . "/conf/log.conf" );
+Log::Log4perl->init_and_watch( INSTALL_DIR . "/conf/log.conf", 60 );
my $logger = Log::Log4perl->get_logger( basename($0) );
Log::Log4perl::MDC->put( 'proc', basename($0) );
# storing process id instead of thread id in tid (more useful)
============================================================
--- pf/sbin/pfmon 75af6cfee8308c452c6935d8a5916e7bfc72d986
+++ pf/sbin/pfmon a896c3e84532d84214ad2e9ed4cf7a2d9da7fac4
@@ -28,7 +28,7 @@ use lib INSTALL_DIR . "/lib";
use constant INSTALL_DIR => '/usr/local/pf';
use lib INSTALL_DIR . "/lib";
-Log::Log4perl->init( INSTALL_DIR . "/conf/log.conf" );
+Log::Log4perl->init_and_watch( INSTALL_DIR . "/conf/log.conf", 60 );
my $logger = Log::Log4perl->get_logger( basename($0) );
Log::Log4perl::MDC->put( 'proc', basename($0) );
Log::Log4perl::MDC->put( 'tid', threads->self->tid() );
============================================================
--- pf/sbin/pfredirect 9d3cd0b2adb55bafa62c155c726a632becde71e2
+++ pf/sbin/pfredirect f5dff5e3c935228e32fdf42cd3511ee65e983008
@@ -31,7 +31,7 @@ use pf::util;
use pf::config;
use pf::util;
-Log::Log4perl->init( INSTALL_DIR . "/conf/log.conf" );
+Log::Log4perl->init_and_watch( INSTALL_DIR . "/conf/log.conf", 60 );
my $logger = Log::Log4perl->get_logger( basename($0) );
Log::Log4perl::MDC->put( 'proc', basename($0) );
Log::Log4perl::MDC->put( 'tid', 0 );
============================================================
--- pf/sbin/pfsetvlan 719d214cc8ef1392eebfec2aded025c4d06f551c
+++ pf/sbin/pfsetvlan ba345d6ffd9f5270401f550759d023dd19581548
@@ -92,7 +92,7 @@ use pf::floatingdevice::custom;
# }}}1
-Log::Log4perl->init( INSTALL_DIR . '/conf/log.conf' );
+Log::Log4perl->init_and_watch( INSTALL_DIR . '/conf/log.conf', 60 );
my $logger = Log::Log4perl->get_logger( basename($0) );
Log::Log4perl::MDC->put( 'proc', basename($0) );
Log::Log4perl::MDC->put( 'tid', threads->self->tid() );
============================================================
--- pf/lib/pf/WebAPI.pm 71cea0df063d4a2c7aeaa2f14fd42fcf3b127e41
+++ pf/lib/pf/WebAPI.pm 82e6064ab5fee01e367bbc03be795e8185d9479e
@@ -21,7 +21,7 @@ use SOAP::Transport::HTTP;
#use SOAP::Lite +trace => [ fault => \&log_faults ];
use SOAP::Transport::HTTP;
-Log::Log4perl->init_once("$conf_dir/log.conf");
+Log::Log4perl->init_and_watch("$conf_dir/log.conf",60);
Log::Log4perl::MDC->put('proc', 'pf::WebAPI');
# set proper logger tid based on if we are run from mod_perl or not
log4perl_v2.patch [^] (5,108 bytes) 2011-03-17 14:35 [Show Content] [Hide Content]#
# old_revision [7d95979a7a190aeb208c1529f15daeaf5ac3e9a3]
#
# patch "pf/lib/pf/WebAPI.pm"
# from [71cea0df063d4a2c7aeaa2f14fd42fcf3b127e41]
# to [f70a7589b3b61bd4f4f54efa6204e439d2d68f20]
#
# patch "pf/lib/pf/config.pm"
# from [1943fb3fc47059c19c217a2f7438bffeaef4de4a]
# to [2ee812dc8838618fa083cd5e30a40df0d06b5106]
#
# patch "pf/sbin/pfdetect"
# from [af89b91c74b82afad5bdadbc6b5209b1a74c3476]
# to [d93d17bfc4e17c9adaf48d5c99c9a581f643c101]
#
# patch "pf/sbin/pfdhcplistener"
# from [3613f4c25e8dca07738ba03070e018146ae5f540]
# to [28589784ea3387f128b6f9c32e8220304e53c61f]
#
# patch "pf/sbin/pfmon"
# from [75af6cfee8308c452c6935d8a5916e7bfc72d986]
# to [11babb2d1a513e8e46b82249a4b6e4dd14864e46]
#
# patch "pf/sbin/pfredirect"
# from [9d3cd0b2adb55bafa62c155c726a632becde71e2]
# to [f4732742160ee3d54d59411ae8620b73b44bdb7e]
#
# patch "pf/sbin/pfsetvlan"
# from [719d214cc8ef1392eebfec2aded025c4d06f551c]
# to [0fe222b58a1e11e0305722fffeec39d437f4636d]
#
============================================================
--- pf/sbin/pfdetect af89b91c74b82afad5bdadbc6b5209b1a74c3476
+++ pf/sbin/pfdetect d93d17bfc4e17c9adaf48d5c99c9a581f643c101
@@ -37,7 +37,7 @@ use pf::person;
use pf::os;
use pf::person;
-Log::Log4perl->init( INSTALL_DIR . "/conf/log.conf" );
+Log::Log4perl->init_and_watch( INSTALL_DIR . "/conf/log.conf", $LOG4PERL_RELOAD_TIMER );
my $logger = Log::Log4perl->get_logger( basename($0) );
Log::Log4perl::MDC->put( 'proc', basename($0) );
Log::Log4perl::MDC->put( 'tid', 0 );
============================================================
--- pf/sbin/pfdhcplistener 3613f4c25e8dca07738ba03070e018146ae5f540
+++ pf/sbin/pfdhcplistener 28589784ea3387f128b6f9c32e8220304e53c61f
@@ -43,7 +43,7 @@ use pf::violation;
use pf::util;
use pf::violation;
-Log::Log4perl->init( INSTALL_DIR . "/conf/log.conf" );
+Log::Log4perl->init_and_watch( INSTALL_DIR . "/conf/log.conf", $LOG4PERL_RELOAD_TIMER );
my $logger = Log::Log4perl->get_logger( basename($0) );
Log::Log4perl::MDC->put( 'proc', basename($0) );
# storing process id instead of thread id in tid (more useful)
============================================================
--- pf/sbin/pfmon 75af6cfee8308c452c6935d8a5916e7bfc72d986
+++ pf/sbin/pfmon 11babb2d1a513e8e46b82249a4b6e4dd14864e46
@@ -28,7 +28,7 @@ use lib INSTALL_DIR . "/lib";
use constant INSTALL_DIR => '/usr/local/pf';
use lib INSTALL_DIR . "/lib";
-Log::Log4perl->init( INSTALL_DIR . "/conf/log.conf" );
+Log::Log4perl->init_and_watch( INSTALL_DIR . "/conf/log.conf", $LOG4PERL_RELOAD_TIMER );
my $logger = Log::Log4perl->get_logger( basename($0) );
Log::Log4perl::MDC->put( 'proc', basename($0) );
Log::Log4perl::MDC->put( 'tid', threads->self->tid() );
============================================================
--- pf/sbin/pfredirect 9d3cd0b2adb55bafa62c155c726a632becde71e2
+++ pf/sbin/pfredirect f4732742160ee3d54d59411ae8620b73b44bdb7e
@@ -31,7 +31,7 @@ use pf::util;
use pf::config;
use pf::util;
-Log::Log4perl->init( INSTALL_DIR . "/conf/log.conf" );
+Log::Log4perl->init_and_watch( INSTALL_DIR . "/conf/log.conf", $LOG4PERL_RELOAD_TIMER );
my $logger = Log::Log4perl->get_logger( basename($0) );
Log::Log4perl::MDC->put( 'proc', basename($0) );
Log::Log4perl::MDC->put( 'tid', 0 );
============================================================
--- pf/sbin/pfsetvlan 719d214cc8ef1392eebfec2aded025c4d06f551c
+++ pf/sbin/pfsetvlan 0fe222b58a1e11e0305722fffeec39d437f4636d
@@ -92,7 +92,7 @@ use pf::floatingdevice::custom;
# }}}1
-Log::Log4perl->init( INSTALL_DIR . '/conf/log.conf' );
+Log::Log4perl->init_and_watch( INSTALL_DIR . '/conf/log.conf', $LOG4PERL_RELOAD_TIMER );
my $logger = Log::Log4perl->get_logger( basename($0) );
Log::Log4perl::MDC->put( 'proc', basename($0) );
Log::Log4perl::MDC->put( 'tid', threads->self->tid() );
============================================================
--- pf/lib/pf/WebAPI.pm 71cea0df063d4a2c7aeaa2f14fd42fcf3b127e41
+++ pf/lib/pf/WebAPI.pm f70a7589b3b61bd4f4f54efa6204e439d2d68f20
@@ -21,7 +21,7 @@ use SOAP::Transport::HTTP;
#use SOAP::Lite +trace => [ fault => \&log_faults ];
use SOAP::Transport::HTTP;
-Log::Log4perl->init_once("$conf_dir/log.conf");
+Log::Log4perl->init_and_watch("$conf_dir/log.conf", $LOG4PERL_RELOAD_TIMER);
Log::Log4perl::MDC->put('proc', 'pf::WebAPI');
# set proper logger tid based on if we are run from mod_perl or not
============================================================
--- pf/lib/pf/config.pm 1943fb3fc47059c19c217a2f7438bffeaef4de4a
+++ pf/lib/pf/config.pm 2ee812dc8838618fa083cd5e30a40df0d06b5106
@@ -69,7 +69,7 @@ BEGIN {
LOOPBACK_IPV4
%connection_type %connection_type_to_str %connection_type_explained
$RADIUS_API_LEVEL $VLAN_API_LEVEL
- %CAPTIVE_PORTAL
+ %CAPTIVE_PORTAL $LOG4PERL_RELOAD_TIMER
);
}
@@ -180,6 +180,9 @@ Readonly %CAPTIVE_PORTAL => (
"NET_DETECT_RETRY_DELAY" => 30,
);
+# Log Reload Timer in seconds (default: 5min)
+Readonly::Scalar our $LOG4PERL_RELOAD_TIMER => 300
+
readPfConfigFiles();
readNetworkConfigFile();
|