You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Charles Leclerc (JIRA)" <ji...@apache.org> on 2015/08/23 04:21:45 UTC
[jira] [Closed] (LOG4J2-1100) Unable to configure Multiple
triggering policies on rolling file appender using yaml configuration file
[ https://issues.apache.org/jira/browse/LOG4J2-1100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Charles Leclerc closed LOG4J2-1100.
-----------------------------------
Resolution: Not A Problem
After analysis, the yaml configuration wasn't properly formatted : an array was created below the Policies element :
{code}
Policies:
- TimeBasedTriggeringPolicy:
interval: 1
- SizeBasedTriggeringPolicy:
size: 100 MB
{code}
which makes it unrecognizable ; policies should instead be a map :
{code}
Policies:
TimeBasedTriggeringPolicy:
interval: 1
SizeBasedTriggeringPolicy:
size: 100 MB
{code}
The configuration is now recognized without error.
> Unable to configure Multiple triggering policies on rolling file appender using yaml configuration file
> -------------------------------------------------------------------------------------------------------
>
> Key: LOG4J2-1100
> URL: https://issues.apache.org/jira/browse/LOG4J2-1100
> Project: Log4j 2
> Issue Type: Bug
> Components: Appenders
> Affects Versions: 2.3
> Reporter: Charles Leclerc
> Priority: Minor
> Attachments: log4j2.json, log4j2.xml, log4j2.yaml
>
>
> I wanted to use yaml instead of XML for better lisibility of the configuration. I tried the attached log4j2.yaml configuration file and when running the application I have the following error in the console :
> {noformat}
> 2015-08-21 11:25:26,052 ERROR appender RollingFile has no parameter that matches element Policies
> {noformat}
> I tried different changes but had no success. From what I understand the configuration below seems to be correct, but I may be wrong. The XML and JSON version of my configuration (also attached to this issue) work fine.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org