Claire Li
Claire Li

Reputation: 13

What is the 3 digit number next to timestamp in Kafka server logs?

I've searched endlessly to find documentation on Kafka server.log data, and what it's format is. I was wondering if any Kafka experts here know what the three digit values next to timestamp is, in server.log?

I've bolded them below: 945, 429, 046, 149, etc.

I'm very curious, and was surprised when I couldn't find information on this online. Or maybe my Google searching is weak haha.

[2019-10-03 23:28:57,945] INFO Socket error occurred: localhost/127.0.0.1:2181: Connection refused (org.apache.zookeeper.ClientCnxn) [2019-10-03 23:28:58,429] INFO [ZooKeeperClient] Closing. (kafka.zookeeper.ZooKeeperClient) [2019-10-03 23:28:59,046] INFO Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn) [2019-10-03 23:28:59,149] INFO Session: 0x0 closed (org.apache.zookeeper.ZooKeeper) [2019-10-03 23:28:59,150] INFO EventThread shut down for session: 0x0 (org.apache.zookeeper.ClientCnxn) [2019-10-03 23:28:59,152] INFO [ZooKeeperClient] Closed. (kafka.zookeeper.ZooKeeperClient)

Upvotes: 0

Views: 360

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191725

It's not Kafka or Zookeeper specific. It's from log4j ISO8601DateFormat, and is milliseconds, so still "part of the timestamp"

Formats a Date in the format "yyyy-MM-dd HH:mm:ss,SSS" for example "1999-11-27 15:49:37,459".

You can change the format in the log4j.properties

https://github.com/apache/kafka/blob/2.3/config/log4j.properties#L22

Upvotes: 0

Related Questions