The product I work on has many docker microservices in addition to docker
Zookeeper v3.6.2

The envops team has a logstash parser which requires a specific date/time
format (and a couple other items) that requires me to modify the
ConversionPattern in the log4j.properites file.

My question is if changing the pattern will cause issues in the future if I
need to open a Jira zookeeper item and attach the logs for diagnosing the
issue?

Below are my change to the ConversionPattern for the date/time format and
the ZK server ID along with an example log message from the Linux
/var/log/docker-containers.log file:

/conf/log4j.properties

Before my changes:

log4j.appender.CONSOLE.layout.ConversionPattern=*%d{ISO8601}
[myid:%X{myid}]* - %-5p [%t:%C{1}@%L] - %m%n

Feb  5 23:00:06 ng02wdc01azoo01
[docker][8abd469f1349][zookeeper_zoo1_1][docker-registry.ite.idng.ibmcloudsecurity.com:5000/zookeeper:Rel_127][1208]:
*2021-02-05 23:00:06,200 [myid:1]* - INFO 
[CommitProcessor:1:LearnerSessionTracker@116] - Committing global session
0x1005c0d69644a60

After my changes:

log4j.appender.CONSOLE.layout.ConversionPattern=*[%d{MM/dd/yyyy
HH:mm:ss:SSS} UTC] myid-%X{myid}* - %-5p [%t:%C{1}@%L] - %m%n

Feb  5 22:58:00 ng10wdc01azoo01
[docker][e704c73ec8b0][zookeeper_zoo1_1][docker-registry.dev.idng.ibmcloudsecurity.com:5000/zookeeper:Dev_357][1204]:
*[02/05/2021 22:58:00:708 UTC] myid1* - INFO 
[CommitProcessor:1:LeaderSessionTracker@104] - Committing global session
0x30040af98ec1bde



--
Sent from: http://zookeeper-user.578899.n2.nabble.com/

Reply via email to