Created
October 11, 2012 19:34
-
-
Save ihabunek/3874964 to your computer and use it in GitHub Desktop.
Testing rolling appender
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include('../src/main/php/Logger.php'); | |
Logger::configure(array( | |
'appenders' => array( | |
'default' => array( | |
'class' => 'LoggerAppenderRollingFile', | |
'layout' => array( | |
'class' => 'LoggerLayoutPattern', | |
'params' => array( | |
'conversionPattern' => '%pid - %msg%n' | |
) | |
), | |
'params' => array( | |
'file' => 'logs/rolling.log', | |
'maxFileSize' => '100KB', | |
'maxBackupIndex' => 10000 | |
), | |
), | |
), | |
'rootLogger' => array( | |
'appenders' => array('default'), | |
), | |
)); | |
$logger = Logger::getLogger(''); | |
for ($i = 0; $i < 100000; $i++) { | |
$logger->debug($i); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM Start 10 processes simultaneously | |
start /min php rolling.php | |
start /min php rolling.php | |
start /min php rolling.php | |
start /min php rolling.php | |
start /min php rolling.php | |
start /min php rolling.php | |
start /min php rolling.php | |
start /min php rolling.php | |
start /min php rolling.php | |
start /min php rolling.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment