iman
iman

Reputation: 155

How to read Netty Logs

I was wondering what this

means in netty logs (the numbers). Is It something related to threads ?

Upvotes: 2

Views: 531

Answers (1)

zapl
zapl

Reputation: 63955

Yes. The naming schema is

poolName + '-' + poolId.incrementAndGet() + '-' + nextId.incrementAndGet();

Where poolName is the class, poolId is a global counter, and nextId is per pool.

So nioEventLoopGroup-2-2 and nioEventLoopGroup-2-3 are the 2nd and 3rd thread from the 2nd pool, and nioEventLoopGroup-5-2 is the 2nd thread from some other pool.

src: https://github.com/netty/netty/blob/4.0/common/src/main/java/io/netty/util/concurrent/DefaultThreadFactory.java#L94

Upvotes: 1

Related Questions