steveohara / j2mod

Enhanced Modbus library implemented in the Java programming language
Apache License 2.0
269 stars 111 forks source link

Move parts of DEBUG logging to TRACE #126

Closed gitMiguel closed 1 year ago

gitMiguel commented 2 years ago

While developing a modbus tool based on this library and switching loggin to debug I noticed these lines repeating quite often. IMO they should go to TRACE. Is there a reason why they are not? You think they could they be moved?

Example log

2022-02-06 09:37:00,516 [DEBUG] [.FastByteArrayInputStream] - reset() 2022-02-06 09:37:00,516 [DEBUG] [.FastByteArrayInputStream] - mark=0 pos=0 2022-02-06 09:37:00,516 [DEBUG] [.FastByteArrayInputStream] - mark() 2022-02-06 09:37:00,516 [DEBUG] [.FastByteArrayInputStream] - mark=0 pos=0 2022-02-06 09:37:00,516 [DEBUG] [.FastByteArrayInputStream] - read() 2022-02-06 09:37:00,516 [DEBUG] [.FastByteArrayInputStream] - count=10 pos=7 2022-02-06 09:37:00,516 [DEBUG] [.FastByteArrayInputStream] - reset() 2022-02-06 09:37:00,516 [DEBUG] [.FastByteArrayInputStream] - mark=0 pos=0 2022-02-06 09:37:00,516 [DEBUG] [.FastByteArrayInputStream] - read() 2022-02-06 09:37:00,516 [DEBUG] [.FastByteArrayInputStream] - count=10 pos=0 2022-02-06 09:37:00,517 [DEBUG] [.FastByteArrayInputStream] - read() 2022-02-06 09:37:00,517 [DEBUG] [.FastByteArrayInputStream] - count=10 pos=1 2022-02-06 09:37:00,517 [DEBUG] [.FastByteArrayInputStream] - read() 2022-02-06 09:37:00,517 [DEBUG] [.FastByteArrayInputStream] - count=10 pos=2 2022-02-06 09:37:00,517 [DEBUG] [.FastByteArrayInputStream] - read() 2022-02-06 09:37:00,517 [DEBUG] [.FastByteArrayInputStream] - count=10 pos=3 2022-02-06 09:37:00,517 [DEBUG] [.FastByteArrayInputStream] - read() 2022-02-06 09:37:00,517 [DEBUG] [.FastByteArrayInputStream] - count=10 pos=4 2022-02-06 09:37:00,517 [DEBUG] [.FastByteArrayInputStream] - read() 2022-02-06 09:37:00,517 [DEBUG] [.FastByteArrayInputStream] - count=10 pos=5 2022-02-06 09:37:00,517 [DEBUG] [.FastByteArrayInputStream] - read() 2022-02-06 09:37:00,517 [DEBUG] [.FastByteArrayInputStream] - count=10 pos=6 2022-02-06 09:37:00,517 [DEBUG] [.FastByteArrayInputStream] - read() 2022-02-06 09:37:00,517 [DEBUG] [.FastByteArrayInputStream] - count=10 pos=7 2022-02-06 09:37:00,517 [DEBUG] [.FastByteArrayInputStream] - read() 2022-02-06 09:37:00,517 [DEBUG] [.FastByteArrayInputStream] - count=10 pos=8 2022-02-06 09:37:00,517 [DEBUG] [.FastByteArrayInputStream] - read() 2022-02-06 09:37:00,517 [DEBUG] [.FastByteArrayInputStream] - count=10 pos=9

2022-02-06 09:37:00,517 [DEBUG] [mod.modbus.util.BitVector] - Get bit #0

LivingWithHippos commented 2 years ago

How did you set up the log level?

gitMiguel commented 2 years ago

I'm developing with eclipse and use log4j. I have defined the logger like this: <Logger name="com.ghgande.j2mod.modbus" level="debug"/>.

steveohara commented 1 year ago

Agreed - changed in next build