RollingFileAppender + DirectWriteRolloverStrategy does not rollover file

2020-04-27 Thread Benjamin Asbach
Hej! Currently I try to configure log4j2 to: * create a log in a folder with dates: e.h. 2020_04_27/messages.20200427_13_39_01.log * limit the log size to 250MB (* use a custom layout) (* rollover every day) But I'm already stuck with the first two bullets ``` appender.msglog.type = RollingF

Re: RollingFileAppender + DirectWriteRolloverStrategy does not rollover file

2020-04-27 Thread Benjamin Asbach
appender.msglog.policies.size.type = SizeBasedTriggeringPolicy appender.msglog.policies.size.size = 250MB ``` Sorry for noise. Benjamin On 2020-04-27 16:24, Benjamin Asbach wrote: Hej! Currently I try to configure log4j2 to: * create a log in a folder with dates: e.h. 2020_04_27/messages.20200427_13_39_01

Re: RollingFileAppender + DirectWriteRolloverStrategy does not rollover file

2020-04-27 Thread Benjamin Asbach
tried `appender.msglog.policies.time.type = TimeBasedTriggeringPolicy`. Both results into a single log file `msg-2020_04_27_00_00_00-0.log` and size based logging stops working. Any ideas? Maybe I misunderstand some basic concept? Thanks in advance Benjamin On 2020-04-27 17:47, Benjamin Asbach wrote: I guess I found a sol

Re: RollingFileAppender + DirectWriteRolloverStrategy does not rollover file

2020-04-27 Thread Benjamin Asbach
r 27, 2020, at 10:39 AM, Benjamin Asbach wrote: I guess I've been glad to early. ``` appender.msglog.type = RollingFile appender.msglog.name = localmsglog appender.msglog.filePattern = /tmp/msg-%d{_MM_dd}/nps-message-%d{_MM_dd_HH_mm_ss}.log appender.msglog.layout.type =

Re: Java.lang.LinkageError

2020-04-29 Thread Benjamin Asbach
Hello Edmondo, I don't think this is an log4j related issue. You're using Powermock in combination with JUnit 5 which currently is not supported [1]. There's some kind of workaround [2] you might try that out. Greetings Benjamin [1] https://github.com/powermock/powermock/issues/830 [2] htt

Should `Configurator.reconfigure` reconfigure existing `Loggers`?

2020-04-29 Thread Benjamin Asbach
Hej. I currently try to reconfigure log4j2 by using `Configurator.reconfigure`: https://gist.github.com/asbachb/6cac46a191ea47792bcf467cd865f06f I'd expect that there's a console output like: ``` INFO1 INFO2 DEBUG2 ``` but instead I just get: ``` INFO1 ``` It seems that `Configurator.reconf

Re: Should `Configurator.reconfigure` reconfigure existing `Loggers`?

2020-04-29 Thread Benjamin Asbach
So basically I recognized that `PropertiesConfigurationBuilder` is clearing the passed `Properties`. So when recreating the second properties my test case is working. On 2020-04-29 13:39, Benjamin Asbach wrote: Hej. I currently try to reconfigure log4j2 by using `Configurator.reconfigure

log4j2 and Java WebStart

2020-05-13 Thread Benjamin Asbach
Hello, I wonder if someone is using log4j2 with Java WebStart? I currently try to integrate log4j2 into such an application environment but recognized that the JNLP2Classloader is not able to obtain log4j2 meta-data from other jar files. So only the api plugins (core meta data is not found) a

Re: DefaultRolloverStrategy max=0 - Problem?

2020-05-29 Thread Benjamin Asbach
Hi Edmondo, for me it's unclear what you want to accomplish. `strategy.max = 0` indicates that you don't wan't to roll at all. So why you're using a RollingFileAppender? Maybe it would be useful to tell what you try to config at all. Greetings Benjamin On 2020-05-29 11:40, EDMONDO SENA wrot

Re: DefaultRolloverStrategy max=0 - Problem?

2020-05-29 Thread Benjamin Asbach
gging. On 2020/05/29 09:46:04, Benjamin Asbach wrote: Hi Edmondo, for me it's unclear what you want to accomplish. `strategy.max = 0` indicates that you don't wan't to roll at all. So why you're using a RollingFileAppender? Maybe it would be useful to tell what you try to

IOException after midnight roll

2020-06-17 Thread Benjamin Asbach
Hi, every night after rolling we experience IOExceptions when our logger tries to log. So after midnight there's no logging to that log file at all. The application is running on four WebLogic12 nodes. All nodes are running on the same machine. All logs are going to the same directory. The lo

Re: IOException after midnight roll

2020-06-18 Thread Benjamin Asbach
eating the directory for some reason. Ralph On Jun 17, 2020, at 6:09 PM, Benjamin Asbach wrote: Hi, every night after rolling we experience IOExceptions when our logger tries to log. So after midnight there's no logging to that log file at all. The application is running on four WebLogic12 n

Re: IOException after midnight roll

2020-06-18 Thread Benjamin Asbach
use DirectWriteRolloverStrategy. You are using SizeBasedTriggeringPolicy and don’t have %I in the pattern, which is normally required for a size based rollover. However, that doesn’t seem to be a problem here. I notice that the previous file was in the directory named 2020_06_17 while the new file is s

Re: IOException after midnight roll

2020-06-18 Thread Benjamin Asbach
, Benjamin Asbach wrote: I could reproduce the problem wiht some test code: ``` import java.util.Properties; import org.apache.logging.log4j.core.Logger; import org.apache.logging.log4j.core.LoggerContext; import org.apache.logging.log4j.core.config.properties.PropertiesConfiguration; import