[jira] [Updated] (LOG4J2-1767) when SizeBasedTriggeringPolicy value is changed on the fly, log4j2 still rolls over based on the older value

2017-01-05 Thread prayagupd (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

prayagupd updated LOG4J2-1767:
--
Summary: when SizeBasedTriggeringPolicy value is changed on the fly, log4j2 
still rolls over based on the older value  (was: when SizeBasedTriggeringPolicy 
value is changed on the fly, log4j2 still picks up the older value)

> when SizeBasedTriggeringPolicy value is changed on the fly, log4j2 still 
> rolls over based on the older value
> 
>
> Key: LOG4J2-1767
> URL: https://issues.apache.org/jira/browse/LOG4J2-1767
> Project: Log4j 2
>  Issue Type: Question
>  Components: Appenders
>Affects Versions: 2.5
> Environment: java-1.8.0-ibm-1.8.0.3.20-1, 
> log4j2 2.5
>Reporter: prayagupd
>
> I have log4j2.json config as below, with SizeBasedTriggeringPolicy as 1MB. 
> Its a web app hosted on tomcat 7.
> {code}
> {
>   "configuration": {
> "status" : "info",
> "shutdownHook":"disable",
> "name": "lo",
> "appenders": {
>   "RollingFile": {
> "name": "rollingFile",
> "fileName": "/var/log/cor/test_logging12.log",
> "filePattern": 
> "/var/log/cor/test_logging12-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz",
> "CustomJSONLayout": {
>   "complete": false,
>   "compact": true,
>   "eventEol": true
> },
> "SizeBasedTriggeringPolicy": {
>   "size": "1 MB"
> },
> "DefaultRolloverStrategy": {
>   "max": "10"
> }
>   }
> },
> "loggers": {
>   "root": {
> "level": "DEBUG",
> "appender-ref": {
>   "ref": "rollingFile"
> }
>   }
> }
>   }
> }
> {code}
> When I changed that in on the fly, it is taken in account by  log4j2, it 
> still rolls over on the older size. It reads the new size only if I restart 
> the server.
> {code}
> 2017-01-05 12:44:22,143 http-bio-8989-exec-10 TRACE 
> DefaultRolloverStrategy.purge() took 0.0 milliseconds
> 2017-01-05 12:44:22,144 http-bio-8989-exec-10 DEBUG RollingFileManager 
> executing synchronous FileRenameAction[/var/log/cor/logging12.log to 
> /var/log/cor/logging12-01-05-17-12-44-22-1.log, renameEmptyFiles=false]
> 2017-01-05 12:44:22,144 http-bio-8989-exec-10 DEBUG RollingFileManager 
> executing async 
> GzCompressAction[/var/log/cor/logging12-01-05-17-12-44-22-1.log to 
> /var/log/cor/logging12-01-05-17-12-44-22-1.log.gz, deleteSource=true]
> {code}
> It would be great if the new size is read by the log4j2 before rolling 
> over just like the fileName or filePattern can be read on the fly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Updated] (LOG4J2-1767) when SizeBasedTriggeringPolicy value is changed on the fly, log4j2 still picks up the older value

2017-01-05 Thread prayagupd (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

prayagupd updated LOG4J2-1767:
--
Description: 
I have log4j2.json config as below, with SizeBasedTriggeringPolicy as 1MB. Its 
a web app hosted on tomcat 7.

{code}
{
  "configuration": {
"status" : "info",
"shutdownHook":"disable",
"name": "lo",
"appenders": {
  "RollingFile": {
"name": "rollingFile",
"fileName": "/var/log/cor/test_logging12.log",
"filePattern": 
"/var/log/cor/test_logging12-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz",
"CustomJSONLayout": {
  "complete": false,
  "compact": true,
  "eventEol": true
},
"SizeBasedTriggeringPolicy": {
  "size": "1 MB"
},
"DefaultRolloverStrategy": {
  "max": "10"
}
  }
},
"loggers": {
  "root": {
"level": "DEBUG",
"appender-ref": {
  "ref": "rollingFile"
}
  }
}
  }
}
{code}

When I changed that in on the fly, it is taken in account by  log4j2, it still 
rolls over on the older size. It reads the new size only if I restart the 
server.

{code}
2017-01-05 12:44:22,143 http-bio-8989-exec-10 TRACE 
DefaultRolloverStrategy.purge() took 0.0 milliseconds
2017-01-05 12:44:22,144 http-bio-8989-exec-10 DEBUG RollingFileManager 
executing synchronous FileRenameAction[/var/log/cor/logging12.log to 
/var/log/cor/logging12-01-05-17-12-44-22-1.log, renameEmptyFiles=false]
2017-01-05 12:44:22,144 http-bio-8989-exec-10 DEBUG RollingFileManager 
executing async GzCompressAction[/var/log/cor/logging12-01-05-17-12-44-22-1.log 
to /var/log/cor/logging12-01-05-17-12-44-22-1.log.gz, deleteSource=true]
{code}

It would be great if the new size is read by the log4j2 before rolling over 
just like the fileName or filePattern.


  was:

I have log4j2.json config as below, with SizeBasedTriggeringPolicy as 1MB. Its 
a web app hosted on tomcat 7.

{code}
{
  "configuration": {
"status" : "info",
"shutdownHook":"disable",
"name": "lo",
"appenders": {
  "RollingFile": {
"name": "rollingFile",
"fileName": "/var/log/cor/test_logging12.log",
"filePattern": 
"/var/log/cor/test_logging12-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz",
"CustomJSONLayout": {
  "complete": false,
  "compact": true,
  "eventEol": true
},
"SizeBasedTriggeringPolicy": {
  "size": "1 MB"
},
"DefaultRolloverStrategy": {
  "max": "10"
}
  }
},
"loggers": {
  "root": {
"level": "DEBUG",
"appender-ref": {
  "ref": "rollingFile"
}
  }
}
  }
}
{code}

When I changed that in on the fly, it is taken in account by  log4j2, it still 
rolls over on the older size. It reads the new size only if I restart the 
server.

{code}
2017-01-05 12:44:22,143 http-bio-8989-exec-10 TRACE 
DefaultRolloverStrategy.purge() took 0.0 milliseconds
2017-01-05 12:44:22,144 http-bio-8989-exec-10 DEBUG RollingFileManager 
executing synchronous FileRenameAction[/var/log/cor/logging12.log to 
/var/log/cor/logging12-01-05-17-12-44-22-1.log, renameEmptyFiles=false]
2017-01-05 12:44:22,144 http-bio-8989-exec-10 DEBUG RollingFileManager 
executing async GzCompressAction[/var/log/cor/logging12-01-05-17-12-44-22-1.log 
to /var/log/cor/logging12-01-05-17-12-44-22-1.log.gz, deleteSource=true]
{code}



> when SizeBasedTriggeringPolicy value is changed on the fly, log4j2 still 
> picks up the older value
> -
>
> Key: LOG4J2-1767
> URL: https://issues.apache.org/jira/browse/LOG4J2-1767
> Project: Log4j 2
>  Issue Type: Question
>  Components: Appenders
>Affects Versions: 2.5
> Environment: java-1.8.0-ibm-1.8.0.3.20-1, 
> log4j2 2.5
>Reporter: prayagupd
>
> I have log4j2.json config as below, with SizeBasedTriggeringPolicy as 1MB. 
> Its a web app hosted on tomcat 7.
> {code}
> {
>   "configuration": {
> "status" : "info",
> "shutdownHook":"disable",
> "name": "lo",
> "appenders": {
>   "RollingFile": {
> "name": "rollingFile",
> "fileName": "/var/log/cor/test_logging12.log",
> "filePattern": 
> "/var/log/cor/test_logging12-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz",
> "CustomJSONLayout": {
>   "complete": false,
>   "compact": true,
>   "eventEol": true
> },
> "SizeBasedTriggeringPolicy": {
>   "size": "1 MB"
> },
> "DefaultRolloverStrategy": {
>   "max": "10"
> }
>   }
> },
> "loggers": {
>   "root": {
> "level": "DEBUG",
> "appender-ref": {
>   "ref": "rollingFile"
> }
>   }
> }
>   }
> }
> 

[jira] [Updated] (LOG4J2-1767) when SizeBasedTriggeringPolicy value is changed on the fly, log4j2 still picks up the older value

2017-01-05 Thread prayagupd (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

prayagupd updated LOG4J2-1767:
--
Summary: when SizeBasedTriggeringPolicy value is changed on the fly, log4j2 
still picks up the older value  (was: when SizeBasedTriggeringPolicy value is 
changed, log4j2 still picks up the older value)

> when SizeBasedTriggeringPolicy value is changed on the fly, log4j2 still 
> picks up the older value
> -
>
> Key: LOG4J2-1767
> URL: https://issues.apache.org/jira/browse/LOG4J2-1767
> Project: Log4j 2
>  Issue Type: Question
>  Components: Appenders
>Affects Versions: 2.5
> Environment: java-1.8.0-ibm-1.8.0.3.20-1, 
> log4j2 2.5
>Reporter: prayagupd
>
> I have log4j2.json config as below, with SizeBasedTriggeringPolicy as 1MB. 
> Its a web app hosted on tomcat 7.
> {code}
> {
>   "configuration": {
> "status" : "info",
> "shutdownHook":"disable",
> "name": "lo",
> "appenders": {
>   "RollingFile": {
> "name": "rollingFile",
> "fileName": "/var/log/cor/test_logging12.log",
> "filePattern": 
> "/var/log/cor/test_logging12-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz",
> "CustomJSONLayout": {
>   "complete": false,
>   "compact": true,
>   "eventEol": true
> },
> "SizeBasedTriggeringPolicy": {
>   "size": "1 MB"
> },
> "DefaultRolloverStrategy": {
>   "max": "10"
> }
>   }
> },
> "loggers": {
>   "root": {
> "level": "DEBUG",
> "appender-ref": {
>   "ref": "rollingFile"
> }
>   }
> }
>   }
> }
> {code}
> When I changed that in on the fly, it is taken in account by  log4j2, it 
> still rolls over on the older size. It reads the new size only if I restart 
> the server.
> {code}
> 2017-01-05 12:44:22,143 http-bio-8989-exec-10 TRACE 
> DefaultRolloverStrategy.purge() took 0.0 milliseconds
> 2017-01-05 12:44:22,144 http-bio-8989-exec-10 DEBUG RollingFileManager 
> executing synchronous FileRenameAction[/var/log/cor/logging12.log to 
> /var/log/cor/logging12-01-05-17-12-44-22-1.log, renameEmptyFiles=false]
> 2017-01-05 12:44:22,144 http-bio-8989-exec-10 DEBUG RollingFileManager 
> executing async 
> GzCompressAction[/var/log/cor/logging12-01-05-17-12-44-22-1.log to 
> /var/log/cor/logging12-01-05-17-12-44-22-1.log.gz, deleteSource=true]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Updated] (LOG4J2-1767) when SizeBasedTriggeringPolicy value is changed, log4j2 still picks up the older value

2017-01-05 Thread prayagupd (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

prayagupd updated LOG4J2-1767:
--
Environment: 
java-1.8.0-ibm-1.8.0.3.20-1, 
log4j2 2.5

  was:
IBM Websphere, 
java-1.8.0-ibm-1.8.0.3.20-1, 
IBM Iseries, 
log4j2 2.5, log4j 2.6.2


> when SizeBasedTriggeringPolicy value is changed, log4j2 still picks up the 
> older value
> --
>
> Key: LOG4J2-1767
> URL: https://issues.apache.org/jira/browse/LOG4J2-1767
> Project: Log4j 2
>  Issue Type: Question
>  Components: Appenders
>Affects Versions: 2.5
> Environment: java-1.8.0-ibm-1.8.0.3.20-1, 
> log4j2 2.5
>Reporter: prayagupd
>
> I have log4j2.json config as below, with SizeBasedTriggeringPolicy as 1MB. 
> Its a web app hosted on tomcat 7.
> {code}
> {
>   "configuration": {
> "status" : "info",
> "shutdownHook":"disable",
> "name": "lo",
> "appenders": {
>   "RollingFile": {
> "name": "rollingFile",
> "fileName": "/var/log/cor/test_logging12.log",
> "filePattern": 
> "/var/log/cor/test_logging12-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz",
> "CustomJSONLayout": {
>   "complete": false,
>   "compact": true,
>   "eventEol": true
> },
> "SizeBasedTriggeringPolicy": {
>   "size": "1 MB"
> },
> "DefaultRolloverStrategy": {
>   "max": "10"
> }
>   }
> },
> "loggers": {
>   "root": {
> "level": "DEBUG",
> "appender-ref": {
>   "ref": "rollingFile"
> }
>   }
> }
>   }
> }
> {code}
> When I changed that in on the fly, it is taken in account by  log4j2, it 
> still rolls over on the older size. It reads the new size only if I restart 
> the server.
> {code}
> 2017-01-05 12:44:22,143 http-bio-8989-exec-10 TRACE 
> DefaultRolloverStrategy.purge() took 0.0 milliseconds
> 2017-01-05 12:44:22,144 http-bio-8989-exec-10 DEBUG RollingFileManager 
> executing synchronous FileRenameAction[/var/log/cor/logging12.log to 
> /var/log/cor/logging12-01-05-17-12-44-22-1.log, renameEmptyFiles=false]
> 2017-01-05 12:44:22,144 http-bio-8989-exec-10 DEBUG RollingFileManager 
> executing async 
> GzCompressAction[/var/log/cor/logging12-01-05-17-12-44-22-1.log to 
> /var/log/cor/logging12-01-05-17-12-44-22-1.log.gz, deleteSource=true]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Updated] (LOG4J2-1767) when SizeBasedTriggeringPolicy value is changed, log4j2 still picks up the older value

2017-01-05 Thread prayagupd (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

prayagupd updated LOG4J2-1767:
--
Description: 

I have log4j2.json config as below, with SizeBasedTriggeringPolicy as 1MB. Its 
a web app hosted on tomcat 7.

{code}
{
  "configuration": {
"status" : "info",
"shutdownHook":"disable",
"name": "lo",
"appenders": {
  "RollingFile": {
"name": "rollingFile",
"fileName": "/var/log/cor/test_logging12.log",
"filePattern": 
"/var/log/cor/test_logging12-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz",
"CustomJSONLayout": {
  "complete": false,
  "compact": true,
  "eventEol": true
},
"SizeBasedTriggeringPolicy": {
  "size": "1 MB"
},
"DefaultRolloverStrategy": {
  "max": "10"
}
  }
},
"loggers": {
  "root": {
"level": "DEBUG",
"appender-ref": {
  "ref": "rollingFile"
}
  }
}
  }
}
{code}

When I changed that in on the fly, it is taken in account by  log4j2, it still 
rolls over on the older size. It reads the new size only if I restart the 
server.

{code}
2017-01-05 12:44:22,143 http-bio-8989-exec-10 TRACE 
DefaultRolloverStrategy.purge() took 0.0 milliseconds
2017-01-05 12:44:22,144 http-bio-8989-exec-10 DEBUG RollingFileManager 
executing synchronous FileRenameAction[/var/log/cor/logging12.log to 
/var/log/cor/logging12-01-05-17-12-44-22-1.log, renameEmptyFiles=false]
2017-01-05 12:44:22,144 http-bio-8989-exec-10 DEBUG RollingFileManager 
executing async GzCompressAction[/var/log/cor/logging12-01-05-17-12-44-22-1.log 
to /var/log/cor/logging12-01-05-17-12-44-22-1.log.gz, deleteSource=true]
{code}


> when SizeBasedTriggeringPolicy value is changed, log4j2 still picks up the 
> older value
> --
>
> Key: LOG4J2-1767
> URL: https://issues.apache.org/jira/browse/LOG4J2-1767
> Project: Log4j 2
>  Issue Type: Question
>  Components: Appenders
>Affects Versions: 2.5
> Environment: IBM Websphere, 
> java-1.8.0-ibm-1.8.0.3.20-1, 
> IBM Iseries, 
> log4j2 2.5, log4j 2.6.2
>Reporter: prayagupd
>
> I have log4j2.json config as below, with SizeBasedTriggeringPolicy as 1MB. 
> Its a web app hosted on tomcat 7.
> {code}
> {
>   "configuration": {
> "status" : "info",
> "shutdownHook":"disable",
> "name": "lo",
> "appenders": {
>   "RollingFile": {
> "name": "rollingFile",
> "fileName": "/var/log/cor/test_logging12.log",
> "filePattern": 
> "/var/log/cor/test_logging12-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz",
> "CustomJSONLayout": {
>   "complete": false,
>   "compact": true,
>   "eventEol": true
> },
> "SizeBasedTriggeringPolicy": {
>   "size": "1 MB"
> },
> "DefaultRolloverStrategy": {
>   "max": "10"
> }
>   }
> },
> "loggers": {
>   "root": {
> "level": "DEBUG",
> "appender-ref": {
>   "ref": "rollingFile"
> }
>   }
> }
>   }
> }
> {code}
> When I changed that in on the fly, it is taken in account by  log4j2, it 
> still rolls over on the older size. It reads the new size only if I restart 
> the server.
> {code}
> 2017-01-05 12:44:22,143 http-bio-8989-exec-10 TRACE 
> DefaultRolloverStrategy.purge() took 0.0 milliseconds
> 2017-01-05 12:44:22,144 http-bio-8989-exec-10 DEBUG RollingFileManager 
> executing synchronous FileRenameAction[/var/log/cor/logging12.log to 
> /var/log/cor/logging12-01-05-17-12-44-22-1.log, renameEmptyFiles=false]
> 2017-01-05 12:44:22,144 http-bio-8989-exec-10 DEBUG RollingFileManager 
> executing async 
> GzCompressAction[/var/log/cor/logging12-01-05-17-12-44-22-1.log to 
> /var/log/cor/logging12-01-05-17-12-44-22-1.log.gz, deleteSource=true]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Updated] (LOG4J2-1767) when SizeBasedTriggeringPolicy value is changed, log4j2 still picks up the older value

2017-01-05 Thread prayagupd (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

prayagupd updated LOG4J2-1767:
--
Affects Version/s: (was: 2.6.2)

> when SizeBasedTriggeringPolicy value is changed, log4j2 still picks up the 
> older value
> --
>
> Key: LOG4J2-1767
> URL: https://issues.apache.org/jira/browse/LOG4J2-1767
> Project: Log4j 2
>  Issue Type: Question
>  Components: Appenders
>Affects Versions: 2.5
> Environment: IBM Websphere, 
> java-1.8.0-ibm-1.8.0.3.20-1, 
> IBM Iseries, 
> log4j2 2.5, log4j 2.6.2
>Reporter: prayagupd
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Updated] (LOG4J2-1767) when SizeBasedTriggeringPolicy value is changed, log4j2 still picks up the older value

2017-01-05 Thread prayagupd (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

prayagupd updated LOG4J2-1767:
--
Description: (was: When I am testing my logs in IBM server with 
websphere 8, I see multiple log files created at the same time, I don't know 
what's the logic behind it. My logrotate config for 10MB upto 10 files is as 
below, 

{code}
{
  "configuration": {
"name": "lo",
"appenders": {
  "RollingFile": {
"name": "rollingFile",
"fileName": "/var/log/app/test_logging.log",
"filePattern": "/var/log/app/test_logging.log.%i",
"JSONLayout": {
  "complete": false,
  "compact": true,
  "eventEol": true
},
"SizeBasedTriggeringPolicy": {
  "size": "10 MB"
},
"DefaultRolloverStrategy": {
  "max": "10"
}
  }
},
"loggers": {
  "root": {
"level": "DEBUG",
"appender-ref": {
  "ref": "rollingFile"
}
  }
}
  }
}
{code}

I haven't seen this problem in Tomcat on Linux server.

Example, there's test_logging.log, test_logging.log.1 and test_logging.log.12 
less than 10M 

{code}
total 82768
-rw-rw-r-x. 1 4294770729 root   682037 Dec 28 12:30 test_logging.log
-rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging12.log.1
-rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging12.log.10
-rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging12.log.2
-rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging12.log.3
-rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging12.log.4
-rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging12.log.5
-rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging12.log.6
-rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging12.log.7
-rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging12.log.8
-rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging12.log.9

$ cat test_logging.log | wc -l
3161

$ cat test_logging.log.1 | wc -l
14

$ cat test_logging.log.6 | wc -l
14
{code}

After 10 mins, I see it only appending to the test_logging.log.

{code}
total 88560
70 -rw-rw-r-x. 1 4294770729 root  6612026 Dec 28 12:40 test_logging.log
69 -rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging.log.1
48 -rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging.log.10
52 -rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging.log.2
56 -rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging.log.3
45 -rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging.log.4
43 -rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging.log.5
67 -rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging.log.6
39 -rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging.log.7
68 -rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging.log.8
59 -rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging.log.9
{code}

Actually the application was up and running in production with log4j 1.x, so 
the issue is the previous versions as well.

My expectation is it should create the logging files sequentially like 
test_logging.log, rolled over to test_logging.log.1, test_logging.log.2 and so 
on. I want it to rollover when it hits the max size only(which is 10MB in my 
case), but I see few log files are not even of size 10M. If you check 
test_logging.log.1 it is of size 10KB, and test_logging.log.6 is of size 7KB.)

> when SizeBasedTriggeringPolicy value is changed, log4j2 still picks up the 
> older value
> --
>
> Key: LOG4J2-1767
> URL: https://issues.apache.org/jira/browse/LOG4J2-1767
> Project: Log4j 2
>  Issue Type: Question
>  Components: Appenders
>Affects Versions: 2.5
> Environment: IBM Websphere, 
> java-1.8.0-ibm-1.8.0.3.20-1, 
> IBM Iseries, 
> log4j2 2.5, log4j 2.6.2
>Reporter: prayagupd
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Created] (LOG4J2-1767) when SizeBasedTriggeringPolicy value is changed, log4j2 still picks up the older value

2017-01-05 Thread prayagupd (JIRA)
prayagupd created LOG4J2-1767:
-

 Summary: when SizeBasedTriggeringPolicy value is changed, log4j2 
still picks up the older value
 Key: LOG4J2-1767
 URL: https://issues.apache.org/jira/browse/LOG4J2-1767
 Project: Log4j 2
  Issue Type: Question
  Components: Appenders
Affects Versions: 2.5, 2.6.2
 Environment: IBM Websphere, 
java-1.8.0-ibm-1.8.0.3.20-1, 
IBM Iseries, 
log4j2 2.5, log4j 2.6.2
Reporter: prayagupd


When I am testing my logs in IBM server with websphere 8, I see multiple log 
files created at the same time, I don't know what's the logic behind it. My 
logrotate config for 10MB upto 10 files is as below, 

{code}
{
  "configuration": {
"name": "lo",
"appenders": {
  "RollingFile": {
"name": "rollingFile",
"fileName": "/var/log/app/test_logging.log",
"filePattern": "/var/log/app/test_logging.log.%i",
"JSONLayout": {
  "complete": false,
  "compact": true,
  "eventEol": true
},
"SizeBasedTriggeringPolicy": {
  "size": "10 MB"
},
"DefaultRolloverStrategy": {
  "max": "10"
}
  }
},
"loggers": {
  "root": {
"level": "DEBUG",
"appender-ref": {
  "ref": "rollingFile"
}
  }
}
  }
}
{code}

I haven't seen this problem in Tomcat on Linux server.

Example, there's test_logging.log, test_logging.log.1 and test_logging.log.12 
less than 10M 

{code}
total 82768
-rw-rw-r-x. 1 4294770729 root   682037 Dec 28 12:30 test_logging.log
-rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging12.log.1
-rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging12.log.10
-rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging12.log.2
-rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging12.log.3
-rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging12.log.4
-rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging12.log.5
-rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging12.log.6
-rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging12.log.7
-rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging12.log.8
-rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging12.log.9

$ cat test_logging.log | wc -l
3161

$ cat test_logging.log.1 | wc -l
14

$ cat test_logging.log.6 | wc -l
14
{code}

After 10 mins, I see it only appending to the test_logging.log.

{code}
total 88560
70 -rw-rw-r-x. 1 4294770729 root  6612026 Dec 28 12:40 test_logging.log
69 -rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging.log.1
48 -rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging.log.10
52 -rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging.log.2
56 -rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging.log.3
45 -rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging.log.4
43 -rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging.log.5
67 -rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging.log.6
39 -rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging.log.7
68 -rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging.log.8
59 -rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging.log.9
{code}

Actually the application was up and running in production with log4j 1.x, so 
the issue is the previous versions as well.

My expectation is it should create the logging files sequentially like 
test_logging.log, rolled over to test_logging.log.1, test_logging.log.2 and so 
on. I want it to rollover when it hits the max size only(which is 10MB in my 
case), but I see few log files are not even of size 10M. If you check 
test_logging.log.1 it is of size 10KB, and test_logging.log.6 is of size 7KB.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1754) Multiple log files being created for rolling log4j2 conf in IBM Websphere

2017-01-05 Thread prayagupd (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15802481#comment-15802481
 ] 

prayagupd commented on LOG4J2-1754:
---

Thanks Ralph, will do that and see.

> Multiple log files being created for rolling log4j2 conf in IBM Websphere
> -
>
> Key: LOG4J2-1754
> URL: https://issues.apache.org/jira/browse/LOG4J2-1754
> Project: Log4j 2
>  Issue Type: Question
>  Components: Appenders
>Affects Versions: 2.5, 2.6.2
> Environment: IBM Websphere, 
> java-1.8.0-ibm-1.8.0.3.20-1, 
> IBM Iseries, 
> log4j2 2.5, log4j 2.6.2
>Reporter: prayagupd
>
> When I am testing my logs in IBM server with websphere 8, I see multiple log 
> files created at the same time, I don't know what's the logic behind it. My 
> logrotate config for 10MB upto 10 files is as below, 
> {code}
> {
>   "configuration": {
> "name": "lo",
> "appenders": {
>   "RollingFile": {
> "name": "rollingFile",
> "fileName": "/var/log/app/test_logging.log",
> "filePattern": "/var/log/app/test_logging.log.%i",
> "JSONLayout": {
>   "complete": false,
>   "compact": true,
>   "eventEol": true
> },
> "SizeBasedTriggeringPolicy": {
>   "size": "10 MB"
> },
> "DefaultRolloverStrategy": {
>   "max": "10"
> }
>   }
> },
> "loggers": {
>   "root": {
> "level": "DEBUG",
> "appender-ref": {
>   "ref": "rollingFile"
> }
>   }
> }
>   }
> }
> {code}
> I haven't seen this problem in Tomcat on Linux server.
> Example, there's test_logging.log, test_logging.log.1 and test_logging.log.12 
> less than 10M 
> {code}
> total 82768
> -rw-rw-r-x. 1 4294770729 root   682037 Dec 28 12:30 test_logging.log
> -rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging12.log.1
> -rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging12.log.10
> -rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging12.log.2
> -rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging12.log.3
> -rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging12.log.4
> -rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging12.log.5
> -rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging12.log.6
> -rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging12.log.7
> -rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging12.log.8
> -rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging12.log.9
> $ cat test_logging.log | wc -l
> 3161
> $ cat test_logging.log.1 | wc -l
> 14
> $ cat test_logging.log.6 | wc -l
> 14
> {code}
> After 10 mins, I see it only appending to the test_logging.log.
> {code}
> total 88560
> 70 -rw-rw-r-x. 1 4294770729 root  6612026 Dec 28 12:40 test_logging.log
> 69 -rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging.log.1
> 48 -rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging.log.10
> 52 -rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging.log.2
> 56 -rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging.log.3
> 45 -rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging.log.4
> 43 -rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging.log.5
> 67 -rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging.log.6
> 39 -rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging.log.7
> 68 -rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging.log.8
> 59 -rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging.log.9
> {code}
> Actually the application was up and running in production with log4j 1.x, so 
> the issue is the previous versions as well.
> My expectation is it should create the logging files sequentially like 
> test_logging.log, rolled over to test_logging.log.1, test_logging.log.2 and 
> so on. I want it to rollover when it hits the max size only(which is 10MB in 
> my case), but I see few log files are not even of size 10M. If you check 
> test_logging.log.1 it is of size 10KB, and test_logging.log.6 is of size 7KB.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Updated] (LOG4J2-1754) Multiple log files being created for rolling log4j2 conf in IBM Websphere

2016-12-28 Thread prayagupd (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

prayagupd updated LOG4J2-1754:
--
Description: 
When I am testing my logs in IBM server with websphere 8, I see multiple log 
files created at the same time, I don't know what's the logic behind it. My 
logrotate config for 10MB upto 10 files is as below, 

{code}
{
  "configuration": {
"name": "lo",
"appenders": {
  "RollingFile": {
"name": "rollingFile",
"fileName": "/var/log/app/test_logging.log",
"filePattern": "/var/log/app/test_logging.log.%i",
"JSONLayout": {
  "complete": false,
  "compact": true,
  "eventEol": true
},
"SizeBasedTriggeringPolicy": {
  "size": "10 MB"
},
"DefaultRolloverStrategy": {
  "max": "10"
}
  }
},
"loggers": {
  "root": {
"level": "DEBUG",
"appender-ref": {
  "ref": "rollingFile"
}
  }
}
  }
}
{code}

I haven't seen this problem in Tomcat on Linux server.

Example, there's test_logging.log, test_logging.log.1 and test_logging.log.12 
less than 10M 

{code}
total 82768
-rw-rw-r-x. 1 4294770729 root   682037 Dec 28 12:30 test_logging.log
-rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging12.log.1
-rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging12.log.10
-rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging12.log.2
-rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging12.log.3
-rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging12.log.4
-rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging12.log.5
-rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging12.log.6
-rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging12.log.7
-rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging12.log.8
-rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging12.log.9

$ cat test_logging.log | wc -l
3161

$ cat test_logging.log.1 | wc -l
14

$ cat test_logging.log.6 | wc -l
14
{code}

After 10 mins, I see it only appending to the test_logging.log.

{code}
total 88560
70 -rw-rw-r-x. 1 4294770729 root  6612026 Dec 28 12:40 test_logging.log
69 -rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging.log.1
48 -rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging.log.10
52 -rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging.log.2
56 -rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging.log.3
45 -rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging.log.4
43 -rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging.log.5
67 -rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging.log.6
39 -rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging.log.7
68 -rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging.log.8
59 -rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging.log.9
{code}

Actually the application was up and running in production with log4j 1.x, so 
the issue is the previous versions as well.

My expectation is it should create the logging files sequentially like 
test_logging.log, rolled over to test_logging.log.1, test_logging.log.2 and so 
on. I want it to rollover when it hits the max size only(which is 10MB in my 
case), but I see few log files are not even of size 10M. If you check 
test_logging.log.1 it is of size 10KB, and test_logging.log.6 is of size 7KB.

  was:
When I am testing my logs in IBM server with websphere 8, I see multiple log 
files created at the same time, I don't know what's the logic behind it. My 
logrotate config for 10MB upto 10 files is as below, 

{code}
{
  "configuration": {
"name": "lo",
"appenders": {
  "RollingFile": {
"name": "rollingFile",
"fileName": "/var/log/app/test_logging.log",
"filePattern": "/var/log/app/test_logging.log.%i",
"JSONLayout": {
  "complete": false,
  "compact": true,
  "eventEol": true
},
"SizeBasedTriggeringPolicy": {
  "size": "10 MB"
},
"DefaultRolloverStrategy": {
  "max": "10"
}
  }
},
"loggers": {
  "root": {
"level": "DEBUG",
"appender-ref": {
  "ref": "rollingFile"
}
  }
}
  }
}
{code}

I haven't seen this problem in Tomcat on Linux server.

Example, there's test_logging.log, test_logging.log.1 and test_logging.log.12 
less than 10M 

{code}
total 82768
-rw-rw-r-x. 1 4294770729 root   682037 Dec 28 12:30 test_logging.log
-rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging12.log.1
-rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging12.log.10
-rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging12.log.2
-rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 

[jira] [Commented] (LOG4J2-1754) Multiple log files being created for rolling log4j2 conf in IBM Websphere

2016-12-28 Thread prayagupd (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15783995#comment-15783995
 ] 

prayagupd commented on LOG4J2-1754:
---

My expectation is it should create the logging files sequentially like 
test_logging.log, rolled over to test_logging.log.1, test_logging.log.2 and so 
on. I want it to rollover only when it hits the max size (which is 10MB in my 
case), but I see few log files are not even of size 10M. If you check 
test_logging.log.6 which is of size 7KB.


> Multiple log files being created for rolling log4j2 conf in IBM Websphere
> -
>
> Key: LOG4J2-1754
> URL: https://issues.apache.org/jira/browse/LOG4J2-1754
> Project: Log4j 2
>  Issue Type: Question
>  Components: Appenders
>Affects Versions: 2.5, 2.6.2
> Environment: IBM Websphere, 
> java-1.8.0-ibm-1.8.0.3.20-1, 
> IBM Iseries, 
> log4j2 2.5, log4j 2.6.2
>Reporter: prayagupd
>
> When I am testing my logs in IBM server with websphere 8, I see multiple log 
> files created at the same time, I don't know what's the logic behind it. My 
> logrotate config for 10MB upto 10 files is as below, 
> {code}
> {
>   "configuration": {
> "name": "lo",
> "appenders": {
>   "RollingFile": {
> "name": "rollingFile",
> "fileName": "/var/log/app/test_logging.log",
> "filePattern": "/var/log/app/test_logging.log.%i",
> "JSONLayout": {
>   "complete": false,
>   "compact": true,
>   "eventEol": true
> },
> "SizeBasedTriggeringPolicy": {
>   "size": "10 MB"
> },
> "DefaultRolloverStrategy": {
>   "max": "10"
> }
>   }
> },
> "loggers": {
>   "root": {
> "level": "DEBUG",
> "appender-ref": {
>   "ref": "rollingFile"
> }
>   }
> }
>   }
> }
> {code}
> I haven't seen this problem in Tomcat on Linux server.
> Example, there's test_logging.log, test_logging.log.1 and test_logging.log.12 
> less than 10M 
> {code}
> total 82768
> -rw-rw-r-x. 1 4294770729 root   682037 Dec 28 12:30 test_logging.log
> -rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging12.log.1
> -rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging12.log.10
> -rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging12.log.2
> -rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging12.log.3
> -rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging12.log.4
> -rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging12.log.5
> -rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging12.log.6
> -rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging12.log.7
> -rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging12.log.8
> -rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging12.log.9
> $ cat test_logging.log | wc -l
> 3161
> $ cat test_logging.log.1 | wc -l
> 14
> $ cat test_logging.log.6 | wc -l
> 14
> {code}
> After 10 mins, I see it only appending to the test_logging.log.
> {code}
> total 88560
> 70 -rw-rw-r-x. 1 4294770729 root  6612026 Dec 28 12:40 test_logging.log
> 69 -rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging.log.1
> 48 -rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging.log.10
> 52 -rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging.log.2
> 56 -rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging.log.3
> 45 -rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging.log.4
> 43 -rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging.log.5
> 67 -rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging.log.6
> 39 -rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging.log.7
> 68 -rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging.log.8
> 59 -rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging.log.9
> {code}
> Actually the application was up and running in production with log4j 1.x, so 
> the issue is the previous versions as well.
> My expectation is it should create the logging files sequentially like 
> test_logging.log, rolled over to test_logging.log.1, test_logging.log.2 and 
> so on. I want it to rollover when it hits the max size only(which is 10MB in 
> my case), but I see few log files are not even of size 10M. If you check 
> test_logging.log.6 which is of size 7KB. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Comment Edited] (LOG4J2-1754) Multiple log files being created for rolling log4j2 conf in IBM Websphere

2016-12-28 Thread prayagupd (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15783995#comment-15783995
 ] 

prayagupd edited comment on LOG4J2-1754 at 12/28/16 11:34 PM:
--

Hi [~rem...@yahoo.com], My expectation is it should create the logging files 
sequentially like test_logging.log, rolled over to test_logging.log.1, 
test_logging.log.2 and so on. I want it to rollover only when it hits the max 
size (which is 10MB in my case), but I see few log files are not even of size 
10M. If you check test_logging.log.6 which is of size 7KB.



was (Author: prayagupd):
My expectation is it should create the logging files sequentially like 
test_logging.log, rolled over to test_logging.log.1, test_logging.log.2 and so 
on. I want it to rollover only when it hits the max size (which is 10MB in my 
case), but I see few log files are not even of size 10M. If you check 
test_logging.log.6 which is of size 7KB.


> Multiple log files being created for rolling log4j2 conf in IBM Websphere
> -
>
> Key: LOG4J2-1754
> URL: https://issues.apache.org/jira/browse/LOG4J2-1754
> Project: Log4j 2
>  Issue Type: Question
>  Components: Appenders
>Affects Versions: 2.5, 2.6.2
> Environment: IBM Websphere, 
> java-1.8.0-ibm-1.8.0.3.20-1, 
> IBM Iseries, 
> log4j2 2.5, log4j 2.6.2
>Reporter: prayagupd
>
> When I am testing my logs in IBM server with websphere 8, I see multiple log 
> files created at the same time, I don't know what's the logic behind it. My 
> logrotate config for 10MB upto 10 files is as below, 
> {code}
> {
>   "configuration": {
> "name": "lo",
> "appenders": {
>   "RollingFile": {
> "name": "rollingFile",
> "fileName": "/var/log/app/test_logging.log",
> "filePattern": "/var/log/app/test_logging.log.%i",
> "JSONLayout": {
>   "complete": false,
>   "compact": true,
>   "eventEol": true
> },
> "SizeBasedTriggeringPolicy": {
>   "size": "10 MB"
> },
> "DefaultRolloverStrategy": {
>   "max": "10"
> }
>   }
> },
> "loggers": {
>   "root": {
> "level": "DEBUG",
> "appender-ref": {
>   "ref": "rollingFile"
> }
>   }
> }
>   }
> }
> {code}
> I haven't seen this problem in Tomcat on Linux server.
> Example, there's test_logging.log, test_logging.log.1 and test_logging.log.12 
> less than 10M 
> {code}
> total 82768
> -rw-rw-r-x. 1 4294770729 root   682037 Dec 28 12:30 test_logging.log
> -rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging12.log.1
> -rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging12.log.10
> -rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging12.log.2
> -rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging12.log.3
> -rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging12.log.4
> -rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging12.log.5
> -rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging12.log.6
> -rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging12.log.7
> -rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging12.log.8
> -rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging12.log.9
> $ cat test_logging.log | wc -l
> 3161
> $ cat test_logging.log.1 | wc -l
> 14
> $ cat test_logging.log.6 | wc -l
> 14
> {code}
> After 10 mins, I see it only appending to the test_logging.log.
> {code}
> total 88560
> 70 -rw-rw-r-x. 1 4294770729 root  6612026 Dec 28 12:40 test_logging.log
> 69 -rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging.log.1
> 48 -rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging.log.10
> 52 -rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging.log.2
> 56 -rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging.log.3
> 45 -rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging.log.4
> 43 -rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging.log.5
> 67 -rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging.log.6
> 39 -rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging.log.7
> 68 -rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging.log.8
> 59 -rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging.log.9
> {code}
> Actually the application was up and running in production with log4j 1.x, so 
> the issue is the previous versions as well.
> My expectation is it should create the logging files sequentially like 
> test_logging.log, rolled over to test_logging.log.1, test_logging.log.2 and 
> so on. I want it to rollover when it hits the max size only(which is 10MB in 
> my case), but I see few log files are not even of size 10M. 

[jira] [Updated] (LOG4J2-1754) Multiple log files being created for rolling log4j2 conf in IBM Websphere

2016-12-28 Thread prayagupd (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

prayagupd updated LOG4J2-1754:
--
Description: 
When I am testing my logs in IBM server with websphere 8, I see multiple log 
files created at the same time, I don't know what's the logic behind it. My 
logrotate config for 10MB upto 10 files is as below, 

{code}
{
  "configuration": {
"name": "lo",
"appenders": {
  "RollingFile": {
"name": "rollingFile",
"fileName": "/var/log/app/test_logging.log",
"filePattern": "/var/log/app/test_logging.log.%i",
"JSONLayout": {
  "complete": false,
  "compact": true,
  "eventEol": true
},
"SizeBasedTriggeringPolicy": {
  "size": "10 MB"
},
"DefaultRolloverStrategy": {
  "max": "10"
}
  }
},
"loggers": {
  "root": {
"level": "DEBUG",
"appender-ref": {
  "ref": "rollingFile"
}
  }
}
  }
}
{code}

I haven't seen this problem in Tomcat on Linux server.

Example, there's test_logging.log, test_logging.log.1 and test_logging.log.12 
less than 10M 

{code}
total 82768
-rw-rw-r-x. 1 4294770729 root   682037 Dec 28 12:30 test_logging.log
-rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging12.log.1
-rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging12.log.10
-rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging12.log.2
-rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging12.log.3
-rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging12.log.4
-rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging12.log.5
-rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging12.log.6
-rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging12.log.7
-rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging12.log.8
-rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging12.log.9

$ cat test_logging.log | wc -l
3161

$ cat test_logging.log.1 | wc -l
14

$ cat test_logging.log.6 | wc -l
14
{code}

After 10 mins, I see it only appending to the test_logging.log.

{code}
total 88560
70 -rw-rw-r-x. 1 4294770729 root  6612026 Dec 28 12:40 test_logging.log
69 -rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging.log.1
48 -rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging.log.10
52 -rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging.log.2
56 -rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging.log.3
45 -rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging.log.4
43 -rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging.log.5
67 -rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging.log.6
39 -rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging.log.7
68 -rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging.log.8
59 -rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging.log.9
{code}

Actually the application was up and running in production with log4j 1.x, so 
the issue is the previous versions as well.

My expectation is it should create the logging files sequentially like 
test_logging.log, rolled over to test_logging.log.1, test_logging.log.2 and so 
on. I want it to rollover when it hits the max size only(which is 10MB in my 
case), but I see few log files are not even of size 10M. If you check 
test_logging.log.6 which is of size 7KB. 

  was:
When I am testing my logs in IBM server with websphere 8, I see multiple log 
files created at the same time, I don't know what's the logic behind it. My 
logrotate config for 10MB upto 10 files is as below, 

{code}
{
  "configuration": {
"name": "lo",
"appenders": {
  "RollingFile": {
"name": "rollingFile",
"fileName": "/var/log/app/test_logging.log",
"filePattern": "/var/log/app/test_logging.log.%i",
"JSONLayout": {
  "complete": false,
  "compact": true,
  "eventEol": true
},
"SizeBasedTriggeringPolicy": {
  "size": "10 MB"
},
"DefaultRolloverStrategy": {
  "max": "10"
}
  }
},
"loggers": {
  "root": {
"level": "DEBUG",
"appender-ref": {
  "ref": "rollingFile"
}
  }
}
  }
}
{code}

I haven't seen this problem in Tomcat on Linux server.

Example, there's test_logging.log, test_logging.log.1 and test_logging.log.12 
less than 10M 

{code}
total 82768
-rw-rw-r-x. 1 4294770729 root   682037 Dec 28 12:30 test_logging.log
-rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging12.log.1
-rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging12.log.10
-rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging12.log.2
-rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging12.log.3
-rw-rw-r-x. 1 4294770729 root 

[jira] [Updated] (LOG4J2-1754) Multiple log files being created for rolling log4j2 conf in IBM Websphere

2016-12-28 Thread prayagupd (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

prayagupd updated LOG4J2-1754:
--
Description: 
When I am testing my logs in IBM server with websphere 8, I see multiple log 
files created at the same time, I don't know what's the logic behind it. My 
logrotate config for 10MB upto 10 files is as below, 

{code}
{
  "configuration": {
"name": "lo",
"appenders": {
  "RollingFile": {
"name": "rollingFile",
"fileName": "/var/log/app/test_logging.log",
"filePattern": "/var/log/app/test_logging.log.%i",
"JSONLayout": {
  "complete": false,
  "compact": true,
  "eventEol": true
},
"SizeBasedTriggeringPolicy": {
  "size": "10 MB"
},
"DefaultRolloverStrategy": {
  "max": "10"
}
  }
},
"loggers": {
  "root": {
"level": "DEBUG",
"appender-ref": {
  "ref": "rollingFile"
}
  }
}
  }
}
{code}

I haven't seen this problem in Tomcat on Linux server.

Example, there's test_logging.log, test_logging.log.1 and test_logging.log.12 
less than 10M 

{code}
total 82768
-rw-rw-r-x. 1 4294770729 root   682037 Dec 28 12:30 test_logging.log
-rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging12.log.1
-rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging12.log.10
-rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging12.log.2
-rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging12.log.3
-rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging12.log.4
-rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging12.log.5
-rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging12.log.6
-rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging12.log.7
-rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging12.log.8
-rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging12.log.9

$ cat test_logging.log | wc -l
3161

$ cat test_logging.log.1 | wc -l
14

$ cat test_logging.log.6 | wc -l
14
{code}

After 10 mins, I see it only appending to the test_logging.log.

{code}
total 88560
70 -rw-rw-r-x. 1 4294770729 root  6612026 Dec 28 12:40 test_logging.log
69 -rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging.log.1
48 -rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging.log.10
52 -rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging.log.2
56 -rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging.log.3
45 -rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging.log.4
43 -rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging.log.5
67 -rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging.log.6
39 -rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging.log.7
68 -rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging.log.8
59 -rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging.log.9
{code}

Actually the application was up and running in production with log4j 1.x, so 
the issue is the previous versions as well.

  was:
When I am testing my logs in IBM server with websphere 8, I see multiple log 
files created at the same time, I don't know what's the logic behind it. My 
logrotate config is for 100MB upto 10 files.

My config is 

{code}
{
  "configuration": {
"name": "lo",
"appenders": {
  "RollingFile": {
"name": "rollingFile",
"fileName": "/var/log/app/test_logging.log",
"filePattern": "/var/log/app/test_logging.log.%i",
"JSONLayout": {
  "complete": false,
  "compact": true,
  "eventEol": true
},
"SizeBasedTriggeringPolicy": {
  "size": "100 MB"
},
"DefaultRolloverStrategy": {
  "max": "10"
}
  }
},
"loggers": {
  "root": {
"level": "DEBUG",
"appender-ref": {
  "ref": "rollingFile"
}
  }
}
  }
}
{code}

I haven't seen this problem in Tomcat on Linux server.

Example, there's test_logging.log, test_logging.log.1 and test_logging.log.12 
less than 100M 

total 82768
-rw-rw-r-x. 1 4294770729 root   682037 Dec 28 12:30 test_logging.log
-rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging12.log.1
-rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging12.log.10
-rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging12.log.2
-rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging12.log.3
-rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging12.log.4
-rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging12.log.5
-rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging12.log.6
-rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging12.log.7
-rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging12.log.8

[jira] [Commented] (LOG4J2-1754) Multiple log files being created for rolling log4j2 conf in IBM Websphere

2016-12-28 Thread prayagupd (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15783864#comment-15783864
 ] 

prayagupd commented on LOG4J2-1754:
---

Right, I have seen the issue with log4j 1.x too. And I am talking about log4j 
`rolling file` here, not the linux `logrotiation`. I don't know the log4j 
rolling logic, probably it uses java File handeling api. 

> Multiple log files being created for rolling log4j2 conf in IBM Websphere
> -
>
> Key: LOG4J2-1754
> URL: https://issues.apache.org/jira/browse/LOG4J2-1754
> Project: Log4j 2
>  Issue Type: Question
>  Components: Appenders
>Affects Versions: 2.5, 2.6.2
> Environment: IBM Websphere, 
> java-1.8.0-ibm-1.8.0.3.20-1, 
> IBM Iseries, 
> log4j2 2.5, log4j 2.6.2
>Reporter: prayagupd
>
> When I am testing my logs in IBM server with websphere 8, I see multiple log 
> files created at the same time, I don't know what's the logic behind it. My 
> logrotate config is for 100MB upto 10 files.
> My config is 
> {code}
> {
>   "configuration": {
> "name": "lo",
> "appenders": {
>   "RollingFile": {
> "name": "rollingFile",
> "fileName": "/var/log/app/test_logging.log",
> "filePattern": "/var/log/app/test_logging.log.%i",
> "JSONLayout": {
>   "complete": false,
>   "compact": true,
>   "eventEol": true
> },
> "SizeBasedTriggeringPolicy": {
>   "size": "100 MB"
> },
> "DefaultRolloverStrategy": {
>   "max": "10"
> }
>   }
> },
> "loggers": {
>   "root": {
> "level": "DEBUG",
> "appender-ref": {
>   "ref": "rollingFile"
> }
>   }
> }
>   }
> }
> {code}
> I haven't seen this problem in Tomcat on Linux server.
> Example, there's test_logging.log, test_logging.log.1 and test_logging.log.12 
> less than 100M 
> total 82768
> -rw-rw-r-x. 1 4294770729 root   682037 Dec 28 12:30 test_logging.log
> -rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging12.log.1
> -rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging12.log.10
> -rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging12.log.2
> -rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging12.log.3
> -rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging12.log.4
> -rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging12.log.5
> -rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging12.log.6
> -rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging12.log.7
> -rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging12.log.8
> -rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging12.log.9
> $ cat test_logging.log | wc -l
> 3161
> $ cat test_logging.log.1 | wc -l
> 14
> $ cat test_logging.log.6 | wc -l
> 14
> After 10 mins, I see it only appending to the test_logging.log.
> total 88560
> 70 -rw-rw-r-x. 1 4294770729 root  6612026 Dec 28 12:40 test_logging.log
> 69 -rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging.log.1
> 48 -rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging.log.10
> 52 -rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging.log.2
> 56 -rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging.log.3
> 45 -rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging.log.4
> 43 -rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging.log.5
> 67 -rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging.log.6
> 39 -rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging.log.7
> 68 -rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging.log.8
> 59 -rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging.log.9
> Actually the application was up and running in production with log4j 1.x, so 
> the issue is the previous versions as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Updated] (LOG4J2-1754) Multiple log files being created for rolling log4j2 conf in IBM Websphere

2016-12-28 Thread prayagupd (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

prayagupd updated LOG4J2-1754:
--
Description: 
When I am testing my logs in IBM server with websphere 8, I see multiple log 
files created at the same time, I don't know what's the logic behind it. My 
logrotate config is for 100MB upto 10 files.

My config is 

{
  "configuration": {
"name": "lo",
"appenders": {
  "RollingFile": {
"name": "rollingFile",
"fileName": "/var/log/app/test_logging.log",
"filePattern": "/var/log/app/test_logging.log.%i",
"JSONLayout": {
  "complete": false,
  "compact": true,
  "eventEol": true
},
"SizeBasedTriggeringPolicy": {
  "size": "100 MB"
},
"DefaultRolloverStrategy": {
  "max": "10"
}
  }
},
"loggers": {
  "root": {
"level": "DEBUG",
"appender-ref": {
  "ref": "rollingFile"
}
  }
}
  }
}

I haven't seen this problem in Tomcat on Linux server.

Example, there's test_logging.log, test_logging.log.1 and test_logging.log.12 
less than 100M 

total 82768
-rw-rw-r-x. 1 4294770729 root   682037 Dec 28 12:30 test_logging.log
-rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging12.log.1
-rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging12.log.10
-rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging12.log.2
-rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging12.log.3
-rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging12.log.4
-rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging12.log.5
-rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging12.log.6
-rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging12.log.7
-rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging12.log.8
-rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging12.log.9

$ cat test_logging.log | wc -l
3161

$ cat test_logging.log.1 | wc -l
14

$ cat test_logging.log.6 | wc -l
14

After 10 mins, I see it only appending to the test_logging.log.

total 88560
70 -rw-rw-r-x. 1 4294770729 root  6612026 Dec 28 12:40 test_logging.log
69 -rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging.log.1
48 -rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging.log.10
52 -rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging.log.2
56 -rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging.log.3
45 -rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging.log.4
43 -rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging.log.5
67 -rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging.log.6
39 -rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging.log.7
68 -rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging.log.8
59 -rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging.log.9

Actually the application was up and running in production with log4j 1.x, so 
the issue is the previous versions as well.

  was:
When I am testing my logs in IBM server with websphere 8, I see multiple log 
files created at the same time, I don't know what's the logic behind it. My 
logrotate config is for 100MB upto 10 files.

My config is 

{
  "configuration": {
"name": "lo",
"appenders": {
  "RollingFile": {
"name": "rollingFile",
"fileName": "/var/log/app/test_logging.log",
"filePattern": "/var/log/app/test_logging.log.%i",
"JSONLayout": {
  "complete": false,
  "compact": true,
  "eventEol": true
},
"SizeBasedTriggeringPolicy": {
  "size": "100 MB"
},
"DefaultRolloverStrategy": {
  "max": "10"
}
  }
},
"loggers": {
  "root": {
"level": "DEBUG",
"appender-ref": {
  "ref": "rollingFile"
}
  }
}
  }
}

I haven't seen this problem in Tomcat on Linux server.

Example, there's test_logging.log, test_logging.log.1 and test_logging.log.12 
less than 100M 

total 82768
-rw-rw-r-x. 1 4294770729 root   682037 Dec 28 12:30 test_logging.log
-rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging12.log.1
-rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging12.log.10
-rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging12.log.2
-rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging12.log.3
-rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging12.log.4
-rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging12.log.5
-rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging12.log.6
-rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging12.log.7
-rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging12.log.8
-rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 

[jira] [Updated] (LOG4J2-1754) Multiple log files being created for rolling log4j2 conf in IBM Websphere

2016-12-28 Thread prayagupd (JIRA)

 [ 
https://issues.apache.org/jira/browse/LOG4J2-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

prayagupd updated LOG4J2-1754:
--
Description: 
When I am testing my logs in IBM server with websphere 8, I see multiple log 
files created at the same time, I don't know what's the logic behind it. My 
logrotate config is for 100MB upto 10 files.

My config is 

{
  "configuration": {
"name": "lo",
"appenders": {
  "RollingFile": {
"name": "rollingFile",
"fileName": "/var/log/app/test_logging.log",
"filePattern": "/var/log/app/test_logging.log.%i",
"JSONLayout": {
  "complete": false,
  "compact": true,
  "eventEol": true
},
"SizeBasedTriggeringPolicy": {
  "size": "100 MB"
},
"DefaultRolloverStrategy": {
  "max": "10"
}
  }
},
"loggers": {
  "root": {
"level": "DEBUG",
"appender-ref": {
  "ref": "rollingFile"
}
  }
}
  }
}

I haven't seen this problem in Tomcat on Linux server.

Example, there's test_logging.log, test_logging.log.1 and test_logging.log.12 
less than 100M 

total 82768
-rw-rw-r-x. 1 4294770729 root   682037 Dec 28 12:30 test_logging.log
-rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging12.log.1
-rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging12.log.10
-rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging12.log.2
-rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging12.log.3
-rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging12.log.4
-rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging12.log.5
-rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging12.log.6
-rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging12.log.7
-rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging12.log.8
-rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging12.log.9

$ cat test_logging.log | wc -l
3161

$ cat test_logging.log.1 | wc -l
14

$ cat test_logging.log.6 | wc -l
14

After 10 mins, I see it only appending to the test_logging.log.

total 88560
70 -rw-rw-r-x. 1 4294770729 root  6612026 Dec 28 12:40 test_logging.log
69 -rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging.log.1
48 -rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging.log.10
52 -rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging.log.2
56 -rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging.log.3
45 -rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging.log.4
43 -rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging.log.5
67 -rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging.log.6
39 -rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging.log.7
68 -rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging.log.8
59 -rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging.log.9


  was:
When I am testing my logs in IBM server with websphere 8, I see multiple log 
files created at the same time, I don't know what's the logic behind it. My 
logrotate config is for 100MB upto 10 files.

My config is 

{
  "configuration": {
"name": "lo",
"appenders": {
  "RollingFile": {
"name": "rollingFile",
"fileName": "/var/log/app/test_logging.log",
"filePattern": 
"/var/log/app/test_logging-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz",
"JSONLayout": {
  "complete": false,
  "compact": true,
  "eventEol": true
},
"SizeBasedTriggeringPolicy": {
  "size": "100 MB"
},
"DefaultRolloverStrategy": {
  "max": "10"
}
  }
},
"loggers": {
  "root": {
"level": "DEBUG",
"appender-ref": {
  "ref": "rollingFile"
}
  }
}
  }
}

I haven't seen this problem in Tomcat server on Linux server.

Example, there's test_logging.10 and test_logging.log less than 100M 

total 82768
-rw-rw-r-x. 1 4294770729 root   682037 Dec 28 12:30 test_logging.log
-rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging12.log.1
-rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging12.log.10
-rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging12.log.2
-rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging12.log.3
-rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging12.log.4
-rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging12.log.5
-rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging12.log.6
-rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging12.log.7
-rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging12.log.8
-rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging12.log.9

$ cat test_cor/logging12.log | wc -l
3161

$cat test_logging12.log.1 | wc -l
14

$ cat 

[jira] [Created] (LOG4J2-1754) Multiple log files being created for rolling log4j2 conf in IBM Websphere

2016-12-28 Thread prayagupd (JIRA)
prayagupd created LOG4J2-1754:
-

 Summary: Multiple log files being created for rolling log4j2 conf 
in IBM Websphere
 Key: LOG4J2-1754
 URL: https://issues.apache.org/jira/browse/LOG4J2-1754
 Project: Log4j 2
  Issue Type: Question
  Components: Appenders
Affects Versions: 2.6.2, 2.5
 Environment: IBM Websphere, 
java-1.8.0-ibm-1.8.0.3.20-1, 
IBM Iseries, 
log4j2 2.5, log4j 2.6.2
Reporter: prayagupd


When I am testing my logs in IBM server with websphere 8, I see multiple log 
files created at the same time, I don't know what's the logic behind it. My 
logrotate config is for 100MB upto 10 files.

My config is 

{
  "configuration": {
"name": "lo",
"appenders": {
  "RollingFile": {
"name": "rollingFile",
"fileName": "/var/log/app/test_logging.log",
"filePattern": 
"/var/log/app/test_logging-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz",
"JSONLayout": {
  "complete": false,
  "compact": true,
  "eventEol": true
},
"SizeBasedTriggeringPolicy": {
  "size": "100 MB"
},
"DefaultRolloverStrategy": {
  "max": "10"
}
  }
},
"loggers": {
  "root": {
"level": "DEBUG",
"appender-ref": {
  "ref": "rollingFile"
}
  }
}
  }
}

I haven't seen this problem in Tomcat server on Linux server.

Example, there's test_logging.10 and test_logging.log less than 100M 

total 82768
-rw-rw-r-x. 1 4294770729 root   682037 Dec 28 12:30 test_logging.log
-rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging12.log.1
-rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging12.log.10
-rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging12.log.2
-rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging12.log.3
-rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging12.log.4
-rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging12.log.5
-rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging12.log.6
-rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging12.log.7
-rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging12.log.8
-rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging12.log.9

$ cat test_cor/logging12.log | wc -l
3161

$cat test_logging12.log.1 | wc -l
14

$ cat test_logging12.log.6 | wc -l
14

After 10 mins, I see it only appending to the test_logging.log.

total 88560
70 -rw-rw-r-x. 1 4294770729 root  6612026 Dec 28 12:40 test_logging.log
69 -rw-rw-r-x. 1 4294770729 root 9513 Dec 28 12:26 test_logging.log.1
48 -rw-rw-r-x. 1 4294770729 root 10491159 Dec 28 10:56 test_logging.log.10
52 -rw-rw-r-x. 1 4294770729 root 10510210 Dec 28 12:26 test_logging.log.2
56 -rw-rw-r-x. 1 4294770729 root 10493793 Dec 28 12:07 test_logging.log.3
45 -rw-rw-r-x. 1 4294770729 root 10489715 Dec 28 11:56 test_logging.log.4
43 -rw-rw-r-x. 1 4294770729 root 10487367 Dec 28 11:50 test_logging.log.5
67 -rw-rw-r-x. 1 4294770729 root 7804 Dec 28 11:33 test_logging.log.6
39 -rw-rw-r-x. 1 4294770729 root 10493965 Dec 28 11:33 test_logging.log.7
68 -rw-rw-r-x. 1 4294770729 root 10485761 Dec 28 11:21 test_logging.log.8
59 -rw-rw-r-x. 1 4294770729 root 10486961 Dec 28 11:10 test_logging.log.9




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org