[ 
https://issues.apache.org/jira/browse/IGNITE-15211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mirza Aliev updated IGNITE-15211:
---------------------------------
    Description: 
When we use Ignite logger in the tests, logger records looks ugly and useless:
{noformat}
<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
{noformat}
 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:
{noformat}%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n{noformat}
These new format should be applied for all tests for each existed modules.

UPD: the formatting looks like this:

{code:java}
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
{code}
which means 
{noformat}
timestamp [loggin level][thread name][logger name] log record
{noformat}

Also, we have added the ability to write logs to file, for tests they are 
places in a "target" folder of the module where tests are presented
   

  was:
When we use Ignite logger in the tests, logger records looks ugly and useless:
{noformat}
<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
{noformat}
 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:
{noformat}%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n{noformat}
These new format should be applied for all tests for each existed modules.

UPD: the formatting looks like this:

{code:java}
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
{code}
which means 
{noformat}
timestamp [loggin level][thread name][logger name] log record
{noformat}
   


> Unify logger format for all components in tests
> -----------------------------------------------
>
>                 Key: IGNITE-15211
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15211
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Vladislav Pyatkov
>            Assignee: Mirza Aliev
>            Priority: Major
>              Labels: ignite-3
>   Original Estimate: 10h
>          Time Spent: 0.5h
>  Remaining Estimate: 9.5h
>
> When we use Ignite logger in the tests, logger records looks ugly and useless:
> {noformat}
> <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
> {noformat}
>  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:
> {noformat}%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n{noformat}
> These new format should be applied for all tests for each existed modules.
> UPD: the formatting looks like this:
> {code:java}
> 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
> {code}
> which means 
> {noformat}
> timestamp [loggin level][thread name][logger name] log record
> {noformat}
> Also, we have added the ability to write logs to file, for tests they are 
> places in a "target" folder of the module where tests are presented
>    



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to