ERROR HTMLLayout contains invalid attributes "datePattern", "timezone"
Jeff Schmidt <[email protected]>
| Newsgroups | gmane.comp.jakarta.log4j.user |
|---|---|
| Message-ID | <[email protected]> |
I'm trying to setup HTML Logging, and want to change the date Pattern. I found the following page: https://logging.apache.org/log4j/2.x/manual/layouts.html#HTMLLayout Which indicates that HtmlLayout has those to parameters: However, when I run my program, I get an error: ERROR HTMLLayout contains invalid attributes "datePattern", "timezone" Here's a snippet from my log4j.xml where I set this up: <Appenders> <RollingFile name="logfile" fileName="sicli-log.html" append="true" filePattern="sicli-log-%i.html.gz"> <SizeBasedTriggeringPolicy size="10MB" /> <DefaultRolloverStrategy fileIndex='min' max="5" /> <HtmlLayout title="sicli log" datePattern="DEFAULT" timezone="America/New_York" /> </RollingFile> </Appenders> And here's the pom.xml version for log4j2: <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-api</artifactId> <version>2.6.1</version> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> <version>2.6.1</version> </dependency> The documentation clearly shows that those should be valid parameters, so why am I getting that error? Thank you for your help in this matter.