[ https://issues.apache.org/jira/browse/LOG4J2-2066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16199533#comment-16199533
]
Gary Gregory commented on LOG4J2-2066:
--------------------------------------
Hi [~saurabhsahu],
If you can provide a failing unit test, we can likely resolve this much faster than leaving
this ticket as it is now.
Thank you!
Gary
> Generated log files starts displaying empty or null character after some time
> ------------------------------------------------------------------------------
>
> Key: LOG4J2-2066
> URL: https://issues.apache.org/jira/browse/LOG4J2-2066
> Project: Log4j 2
> Issue Type: Question
> Components: Appenders
> Affects Versions: 2.3
> Environment: This happens in our performance testing environment.
> Reporter: Saurabh Sahu
> Attachments: logfile.JPG
>
>
> I am facing an issue in performance testing environment. When application starts logging,
log file appears good, but after some time when file grows in size, I see that it has some
kind of empty or invalid character for over 70% of the content. When I see in notepad, it
appears empty but in notepad++, it shows null chracter.
> See attached logfile.JPG
> Whenever files rollback and it creates a new file, eveything works fine but after hours
of time, I notice this. Interesting thing is, it appears those logs get converted or overwritten
to these characters as I see some hours of logs missing.
> Below is my configuration file log4j2.json.
> {code}
> {
> "configuration": {
> "name": "Default",
> "properties": {
> "property": [{
> "name": "log-path",
> "value": "logs"
> },
> {
> "name": "archive",
> "value": "${log-path}/archive"
> }]
> },
> "appenders": {
> "Console": {
> "name": "Console-Appender",
> "target": "SYSTEM_OUT",
> "PatternLayout": {
> "pattern": "[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n"
> }
> },
> "RollingRandomAccessFile": [{
> "name": "RollingFile-Appender",
> "fileName": "${env:USER_INSTALL_ROOT}/applogs/ltv/ltv.log",
> "filePattern": "${env:USER_INSTALL_ROOT}/applogs/ltv/ltv.log.%d{yyyy-MM-dd-hh-mm}.gz",
> "PatternLayout": {
> "pattern": "[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n"
> },
> "Policies": {
> "SizeBasedTriggeringPolicy": {
> "size": "10000 KB"
> }
> },
> "DefaultRolloverStrategy": {
> "max": "10"
> }
> },
> {
> "name": "RollingFileError-Appender",
> "fileName": "${env:USER_INSTALL_ROOT}/applogs/ltv/errors.log",
> "filePattern": "${env:USER_INSTALL_ROOT}/applogs/ltv/errors.log.%d{yyyy-MM-dd-hh-mm}.gz",
> "PatternLayout": {
> "pattern": "[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n"
> },
> "Policies": {
> "SizeBasedTriggeringPolicy": {
> "size": "10000 KB"
> }
> },
> "DefaultRolloverStrategy": {
> "max": "10"
> }
> }]
> },
> "loggers": {
> "logger": {
> "name": "com.business.ltv",
> "level": "all",
> "appender-ref": [
> {
> "ref": "RollingFile-Appender",
> "level": "all"
> },
> {
> "ref": "RollingFileError-Appender",
> "level": "error"
> }]
> },
> "root": {
> "level": "debug",
> "appender-ref": {
> "ref": "Console-Appender"
> }
> }
> }
> }
> }
> {code}
> Could you please look at it and suggest if anything is wrong or causing this?
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
|