opensubscriber
   Find in this group all groups
 
Unknown more information…

l : log4php-user@logging.apache.org 6 June 2006 • 2:39PM -0400

Re: Problem with %d in log4php.properties
by Eric BOYER

REPLY TO AUTHOR
 
REPLY TO GROUP




Marco V. a écrit :

>>I want to use the %d in log4php.properties but nothing is returned :
>>
>>log4php.appender.fichier.layout.ConversionPattern=%d - %-5p [%F:%L] - %m%n
>>
>>or
>>
>>log4php.appender.fichier.layout.ConversionPattern=%d{Y-m-d H:i:s} - %-5p
>>[%F:%L] - %m%n
>>
>>nether return a date in my log !
>>
>>I have for exemple :
>>
>>- DEBUG [/home/boyere/public_html/testLog4Php/index2.php:11] - Hello
>>again 2!
>>
>>
>>In my PHP code I have :
>>$logger =& LoggerManager::getLogger('index.php');
>>$logger->debug('Hello again!');
>>
>>
>>what could be my problem please ?
>>    
>>
>
>Hi Eric,
>
>log4php.properties is parsed using parse_ini_file function.
>According to php documentation:"If a value in the ini file contains any non-alphanumeric characters it needs to be enclosed in
>double-quotes (")."
>So, try to put the ConversionPattern string between double quotes like this:
>
>log4php.appender.fichier.layout.ConversionPattern="%d - %-5p [%F:%L] - %m%n"
>log4php.appender.fichier.layout.ConversionPattern="%d{Y-m-d H:i:s} - %-5p [%F:%L] - %m%n"
>
>this change should address your issue.
>  
>
not better :-(

>Regards,
>-Marco
>
>
>  
>

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.