Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
When we use Ignite logger in the tests, logger records looks ugly and useless:
<E8><FE><EB>. 29, 2021 7:19:45 PM org.apache.ignite.lang.IgniteLogger logInternal INFO: Node unitest:192.168.88.177:5003 received HeartbeatResponse from 192.168.88.177:5005 prevLogIndex=2001 prevLogTerm=1 <E8><FE><EB>. 29, 2021 7:19:45 PM org.apache.ignite.lang.IgniteLogger logInternal INFO: Node unitest:192.168.88.177:5003 received HeartbeatResponse from 192.168.88.177:5004 prevLogIndex=2001 prevLogTerm=1 <E8><FE><EB>. 29, 2021 7:19:45 PM org.apache.ignite.lang.IgniteLogger logInternal INFO: Node unitest:192.168.88.177:5003 received HeartbeatResponse from 192.168.88.177:5006 prevLogIndex=0 prevLogTerm=0 <E8><FE><EB>. 29, 2021 7:19:45 PM org.apache.ignite.lang.IgniteLogger logInternal INFO: Node <unitest/192.168.88.177:5003> received receipt from 192.168.88.177:5006, isOk true
and all messages put down only system out.
I think need to make format better and stores it to file. It should contain:
- Timestamp with milliseconds
- Thread name
- Log message level
I propose a message format like it was in the Ignite 2:
%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
These new format should be applied for all tests for each existed modules.
UPD: the formatting looks like this:
2021-08-11 15:41:39:205 +0300 [INFO][sc-cluster-3345-2][Transport] Stopping 172.25.4.112:3345 2021-08-11 15:41:39:205 +0300 [INFO][sc-cluster-3345-2][Transport] Stopped 172.25.4.112:3345
which means
timestamp [loggin level][thread name][logger name] log record
Also, we have added the ability to write logs to file and to console, for tests they are places in a "target" folder of the module where tests are presented
Attachments
Issue Links
- links to