[
https://issues.apache.org/jira/browse/LOG4PHP-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13968433#comment-13968433
]
Jean-Marie Picot commented on LOG4PHP-218:
------------------------------------------
Sorry, I rewrote the description in English
> Undefined variable: end : helpers/LoggerPatternParser.php [119]
> ---------------------------------------------------------------
>
> Key: LOG4PHP-218
> URL: https://issues.apache.org/jira/browse/LOG4PHP-218
> Project: Log4php
> Issue Type: Bug
> Components: Code
> Affects Versions: 2.3.0
> Reporter: Jean-Marie Picot
> Priority: Minor
> Labels: patch
>
> When using the appender '_LoggerAppenderPDO_' I declare a parameter
> dynamically in my _prepareStatement_ in format String and not use the
> conversion specifiers.
> So, in the _parse()_ method in the class _LoggerPatternParser_, the variable
> _$end_ is not defined and generates an _notice exception php_.
> For example, an extract of my php logger configuration:
> {code}
> 'bdd' => array(
> 'class' => 'LoggerAppenderPDO',
> 'params' => array(
> 'dsn' => 'mysql:host='.DB_HOST.';dbname=mdm_utils',
> 'user' => DB_LOGIN,
> 'password' => DB_PASSWORD,
> 'table' => 'log',
> 'insertSql' => 'INSERT INTO __TABLE__ (dt_log, environnement,
> logger, level_log, message) VALUES (?, ?, ?, ?, ?)',
> 'insertPattern' => '%date{Y-m-d H:i:s},' . getHostName() .
> ',%c,%level,%message'
> ),
> ),
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)