[
https://issues.apache.org/jira/browse/LOG4J2-2517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16710437#comment-16710437
]
Jon Hanson edited comment on LOG4J2-2517 at 12/5/18 6:20 PM:
-------------------------------------------------------------
Trying to do that but it fails to build:
{{[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-toolchains-plugin:1.1:toolchain (default) on
project log4j-api-java9: Cannot find matching toolchain definitions for the
following toolchain types:}}
{{[ERROR] jdk [ version='[9, )' ]}}
{{[ERROR] Please make sure you define the required toolchains in your
~/.m2/toolchains.xml file.}}
{{[ERROR] -> [Help 1]}}
Is there an shortcut to building the core project without Java 9, Mongo et
al...?
*EDIT*
{{i've commented out all but these 4 modules :}}
{{<module>log4j-api</module>}}
{{<module>log4j-core</module>}}
{{<module>log4j-slf4j-impl</module>}}
{{<module>log4j-to-slf4j</module>}}
was (Author: jonhanson):
Trying to do that but it fails to build:
{{[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-toolchains-plugin:1.1:toolchain (default) on
project log4j-api-java9: Cannot find matching toolchain definitions for the
following toolchain types:}}
{{[ERROR] jdk [ version='[9, )' ]}}
{{[ERROR] Please make sure you define the required toolchains in your
~/.m2/toolchains.xml file.}}
{{[ERROR] -> [Help 1]}}
Is there an shortcut to building the core project without Java 9, Mongo et
al...?
EDIT:
i've commented out all but these 4 modules :
{color:#808080}<{color}{color:#569cd6}module{color}{color:#808080}>{color}{color:#d4d4d4}log4j-api{color}{color:#808080}</{color}{color:#569cd6}module{color}{color:#808080}>{color}{color:#6a9955}<{color}{color:#569cd6}module{color}{color:#808080}>{color}{color:#d4d4d4}log4j-core{color}{color:#808080}</{color}{color:#569cd6}module{color}{color:#808080}>{color}
{color:#6a9955}<{color}{color:#569cd6}module{color}{color:#808080}>{color}{color:#d4d4d4}log4j-slf4j-impl{color}{color:#808080}</{color}{color:#569cd6}module{color}{color:#808080}>{color}
{color:#6a9955}<{color}{color:#569cd6}module{color}{color:#808080}>{color}{color:#d4d4d4}log4j-to-slf4j{color}{color:#808080}</{color}{color:#569cd6}module{color}{color:#808080}>{color}
> RollingFileManager OnStartupTriggeringPolicy never rolls the file on startup
> ----------------------------------------------------------------------------
>
> Key: LOG4J2-2517
> URL: https://issues.apache.org/jira/browse/LOG4J2-2517
> Project: Log4j 2
> Issue Type: Bug
> Components: Appenders
> Affects Versions: 2.11.1
> Reporter: Jon Hanson
> Priority: Minor
> Attachments: log4j2.json
>
>
> I'm trying to get log4j2 (V2.11.1) to roll the existing log file at startup
> before it starts logging into a new file. My config is atached to the jira.
> I'm using a RollingFileManager with a OnStartupTriggeringPolicy with
> minSize=0, which, according to the documentation should be sufficient.
> However what i'm finding is that at startup, the
> {{OnStartupTriggeringPolicy}} class {{initialize}} method compares the
> timestamp of the log file to the JVM startup, and if the log file time is
> after the start-up time then it won't roll the file. If I step through the
> code then I see that at the point that check is made the file time is always
> after the JVM start time, because log4j2 appears to have already opened the
> file for writing at that point.
> More info here:
> [https://stackoverflow.com/questions/53632091/log4j2-rollingfilemanager-onstartuptriggeringpolicy-never-rolls-the-file-on-star]
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)