[jira] [Commented] (IGNITE-13219) Slf4jLogger does not implement the LoggerNodeIdAware interface.

2020-07-10 Thread Aleksey Plekhanov (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-13219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17155452#comment-17155452
 ] 

Aleksey Plekhanov commented on IGNITE-13219:


[~ilyak], I think it's very fragile. Log4j uses the current value for system 
property, but not initialization-time value.

Here is reproducer:  
{code:java}
Ignite ignite1 = Ignition.start(new 
IgniteConfiguration().setIgniteInstanceName("ignite1")
.setGridLogger(new Log4J2Logger("config/ignite-log4j2.xml")));

Ignite ignite2 = Ignition.start(new 
IgniteConfiguration().setIgniteInstanceName("ignite2")
.setGridLogger(new Log4J2Logger("config/ignite-log4j2.xml")));

System.setProperty("nodeId", "test");
{code}
After ignite2 starts both nodes start writing to the same log, after 
setProperty they both start writing to ignite-test.log. 

> Slf4jLogger does not implement the LoggerNodeIdAware interface.
> ---
>
> Key: IGNITE-13219
> URL: https://issues.apache.org/jira/browse/IGNITE-13219
> Project: Ignite
>  Issue Type: Improvement
>  Components: general
>Affects Versions: 2.8.1
>Reporter: YuJue Li
>Assignee: YuJue Li
>Priority: Minor
> Fix For: 2.9
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> In the scenario of ignite + slf4j + log4j2, the generated log file is named 
> ignite-${sys:nodeId}.log, The reason for this problem is that Slf4jLogger 
> does not implement the
> LoggerNodeIdAware interface.



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


[jira] [Commented] (IGNITE-13219) Slf4jLogger does not implement the LoggerNodeIdAware interface.

2020-07-10 Thread Ilya Kasnacheev (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-13219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17155272#comment-17155272
 ] 

Ilya Kasnacheev commented on IGNITE-13219:
--

Actually, I think it may make sense to do System.setProperty(NODE_ID, 
U.id8(nodeId)); before initialization of logger, un-set this variable 
afterwards. This will allow nodes which have different nodeId's but brought up 
sequentially to configure their loggers properly [~alex_pl]

> Slf4jLogger does not implement the LoggerNodeIdAware interface.
> ---
>
> Key: IGNITE-13219
> URL: https://issues.apache.org/jira/browse/IGNITE-13219
> Project: Ignite
>  Issue Type: Improvement
>  Components: general
>Affects Versions: 2.8.1
>Reporter: YuJue Li
>Assignee: YuJue Li
>Priority: Minor
> Fix For: 2.9
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> In the scenario of ignite + slf4j + log4j2, the generated log file is named 
> ignite-${sys:nodeId}.log, The reason for this problem is that Slf4jLogger 
> does not implement the
> LoggerNodeIdAware interface.



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


[jira] [Commented] (IGNITE-13219) Slf4jLogger does not implement the LoggerNodeIdAware interface.

2020-07-10 Thread Aleksey Plekhanov (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-13219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17155269#comment-17155269
 ] 

Aleksey Plekhanov commented on IGNITE-13219:


[~liyuj], thanks for the clarification. But there is no such default 
configuration, where {{Slf4jLogger}} and {{config/ignite-log4j2.xml}} used 
together. {{config/ignite-log4j2.xml }}only supposed to be used together with 
{{Log4J2Logger.}}

> Slf4jLogger does not implement the LoggerNodeIdAware interface.
> ---
>
> Key: IGNITE-13219
> URL: https://issues.apache.org/jira/browse/IGNITE-13219
> Project: Ignite
>  Issue Type: Improvement
>  Components: general
>Affects Versions: 2.8.1
>Reporter: YuJue Li
>Assignee: YuJue Li
>Priority: Minor
> Fix For: 2.9
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> In the scenario of ignite + slf4j + log4j2, the generated log file is named 
> ignite-${sys:nodeId}.log, The reason for this problem is that Slf4jLogger 
> does not implement the
> LoggerNodeIdAware interface.



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


[jira] [Commented] (IGNITE-13219) Slf4jLogger does not implement the LoggerNodeIdAware interface.

2020-07-08 Thread YuJue Li (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-13219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17153442#comment-17153442
 ] 

YuJue Li commented on IGNITE-13219:
---

Both Log4JLogger and Log4J2Logger have implemented the LoggerNodeIdAware 
interface.

Slf4jLogger as a bridge library, if do not implement this interface and assign 
a value to the nodeId system property, the default configuration will not run 
normally, because the configuration of config/ignite-log4j2.xml is as follows:


 
 
 
 
 
 
 
 
 
 
 
 

> Slf4jLogger does not implement the LoggerNodeIdAware interface.
> ---
>
> Key: IGNITE-13219
> URL: https://issues.apache.org/jira/browse/IGNITE-13219
> Project: Ignite
>  Issue Type: Improvement
>  Components: general
>Affects Versions: 2.8.1
>Reporter: YuJue Li
>Assignee: YuJue Li
>Priority: Minor
> Fix For: 2.9
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> In the scenario of ignite + slf4j + log4j2, the generated log file is named 
> ignite-${sys:nodeId}.log, The reason for this problem is that Slf4jLogger 
> does not implement the
> LoggerNodeIdAware interface.



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


[jira] [Commented] (IGNITE-13219) Slf4jLogger does not implement the LoggerNodeIdAware interface.

2020-07-07 Thread Aleksey Plekhanov (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-13219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17152676#comment-17152676
 ] 

Aleksey Plekhanov commented on IGNITE-13219:


[~liyuj], as far as I understand - the only goal you want to achieve by this 
patch is to set some system property. This looks like some user-specific case 
and I'm not sure that we should change Ignite for this scenario. It can be 
easily implemented in user code. Another reason why we shouldn't do it in 
Ignite - in general, there can be several Ignite nodes inside one JVM and the 
system property will be overwritten in this case with unpredictable to logger 
results.

> Slf4jLogger does not implement the LoggerNodeIdAware interface.
> ---
>
> Key: IGNITE-13219
> URL: https://issues.apache.org/jira/browse/IGNITE-13219
> Project: Ignite
>  Issue Type: Improvement
>  Components: general
>Affects Versions: 2.8.1
>Reporter: YuJue Li
>Assignee: YuJue Li
>Priority: Minor
> Fix For: 2.9
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> In the scenario of ignite + slf4j + log4j2, the generated log file is named 
> ignite-${sys:nodeId}.log, The reason for this problem is that Slf4jLogger 
> does not implement the
> LoggerNodeIdAware interface.



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


[jira] [Commented] (IGNITE-13219) Slf4jLogger does not implement the LoggerNodeIdAware interface.

2020-07-06 Thread YuJue Li (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-13219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17152433#comment-17152433
 ] 

YuJue Li commented on IGNITE-13219:
---

I developed it using eclipse.
Now using idea and import idea/ignite_ codeStyle.xml file, and then format and 
recommit.

> Slf4jLogger does not implement the LoggerNodeIdAware interface.
> ---
>
> Key: IGNITE-13219
> URL: https://issues.apache.org/jira/browse/IGNITE-13219
> Project: Ignite
>  Issue Type: Improvement
>  Components: general
>Affects Versions: 2.8.1
>Reporter: YuJue Li
>Assignee: YuJue Li
>Priority: Minor
> Fix For: 2.9
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> In the scenario of ignite + slf4j + log4j2, the generated log file is named 
> ignite-${sys:nodeId}.log, The reason for this problem is that Slf4jLogger 
> does not implement the
> LoggerNodeIdAware interface.



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


[jira] [Commented] (IGNITE-13219) Slf4jLogger does not implement the LoggerNodeIdAware interface.

2020-07-06 Thread YuJue Li (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-13219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17152434#comment-17152434
 ] 

YuJue Li commented on IGNITE-13219:
---

I developed it using eclipse.
Now using idea and import idea/ignite_ codeStyle.xml file, and then format and 
recommit.

> Slf4jLogger does not implement the LoggerNodeIdAware interface.
> ---
>
> Key: IGNITE-13219
> URL: https://issues.apache.org/jira/browse/IGNITE-13219
> Project: Ignite
>  Issue Type: Improvement
>  Components: general
>Affects Versions: 2.8.1
>Reporter: YuJue Li
>Assignee: YuJue Li
>Priority: Minor
> Fix For: 2.9
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> In the scenario of ignite + slf4j + log4j2, the generated log file is named 
> ignite-${sys:nodeId}.log, The reason for this problem is that Slf4jLogger 
> does not implement the
> LoggerNodeIdAware interface.



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


[jira] [Commented] (IGNITE-13219) Slf4jLogger does not implement the LoggerNodeIdAware interface.

2020-07-06 Thread Ilya Kasnacheev (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-13219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17152148#comment-17152148
 ] 

Ilya Kasnacheev commented on IGNITE-13219:
--

Hello!

It seems that you need to fix code style, otherwise tests will not run:
{code}
17:18:07
[ERROR] 
/opt/buildagent/work/7bc1c54bc719b67c/modules/slf4j/src/main/java/org/apache/ignite/logger/slf4j/Slf4jLogger.java:22:
 Import statement for 'java.util.UUID' is in the wrong order. Should be in the 
'STANDARD_JAVA_PACKAGE' group, expecting not assigned imports on this line. 
[CustomImportOrder]
17:18:07
[ERROR] 
/opt/buildagent/work/7bc1c54bc719b67c/modules/slf4j/src/main/java/org/apache/ignite/logger/slf4j/Slf4jLogger.java:24:
 Import statement for 'org.apache.ignite.IgniteLogger' is in the wrong order. 
Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on 
this line. [CustomImportOrder]
17:18:07
[ERROR] 
/opt/buildagent/work/7bc1c54bc719b67c/modules/slf4j/src/main/java/org/apache/ignite/logger/slf4j/Slf4jLogger.java:25:
 Import statement for 
'org.apache.ignite.internal.util.tostring.GridToStringExclude' is in the wrong 
order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned 
imports on this line. [CustomImportOrder]
17:18:07
[ERROR] 
/opt/buildagent/work/7bc1c54bc719b67c/modules/slf4j/src/main/java/org/apache/ignite/logger/slf4j/Slf4jLogger.java:26:
 Import statement for 'org.apache.ignite.internal.util.typedef.internal.A' is 
in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not 
assigned imports on this line. [CustomImportOrder]
17:18:07
[ERROR] 
/opt/buildagent/work/7bc1c54bc719b67c/modules/slf4j/src/main/java/org/apache/ignite/logger/slf4j/Slf4jLogger.java:27:
 Import statement for 'org.apache.ignite.internal.util.typedef.internal.S' is 
in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not 
assigned imports on this line. [CustomImportOrder]
17:18:07
[ERROR] 
/opt/buildagent/work/7bc1c54bc719b67c/modules/slf4j/src/main/java/org/apache/ignite/logger/slf4j/Slf4jLogger.java:28:
 Import statement for 'org.apache.ignite.internal.util.typedef.internal.U' is 
in the wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not 
assigned imports on this line. [CustomImportOrder]
17:18:07
[ERROR] 
/opt/buildagent/work/7bc1c54bc719b67c/modules/slf4j/src/main/java/org/apache/ignite/logger/slf4j/Slf4jLogger.java:29:
 Import statement for 'org.apache.ignite.logger.LoggerNodeIdAware' is in the 
wrong order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not 
assigned imports on this line. [CustomImportOrder]
17:18:07
[ERROR] 
/opt/buildagent/work/7bc1c54bc719b67c/modules/slf4j/src/main/java/org/apache/ignite/logger/slf4j/Slf4jLogger.java:30:
 Import statement for 'org.jetbrains.annotations.Nullable' is in the wrong 
order. Should be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned 
imports on this line. [CustomImportOrder]
17:18:07
[ERROR] 
/opt/buildagent/work/7bc1c54bc719b67c/modules/slf4j/src/main/java/org/apache/ignite/logger/slf4j/Slf4jLogger.java:31:
 Import statement for 'org.slf4j.Logger' is in the wrong order. Should be in 
the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 
[CustomImportOrder]
17:18:07
[ERROR] 
/opt/buildagent/work/7bc1c54bc719b67c/modules/slf4j/src/main/java/org/apache/ignite/logger/slf4j/Slf4jLogger.java:32:
 Import statement for 'org.slf4j.LoggerFactory' is in the wrong order. Should 
be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this 
line. [CustomImportOrder]
17:18:07
[ERROR] 
/opt/buildagent/work/7bc1c54bc719b67c/modules/slf4j/src/main/java/org/apache/ignite/logger/slf4j/Slf4jLogger.java:33:
 Import statement for 'org.slf4j.Marker' is in the wrong order. Should be in 
the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this line. 
[CustomImportOrder]
17:18:07
[ERROR] 
/opt/buildagent/work/7bc1c54bc719b67c/modules/slf4j/src/main/java/org/apache/ignite/logger/slf4j/Slf4jLogger.java:34:
 Import statement for 'org.slf4j.MarkerFactory' is in the wrong order. Should 
be in the 'THIRD_PARTY_PACKAGE' group, expecting not assigned imports on this 
line. [CustomImportOrder]
17:18:07
[ERROR] 
/opt/buildagent/work/7bc1c54bc719b67c/modules/slf4j/src/main/java/org/apache/ignite/logger/slf4j/Slf4jLogger.java:52:1:
 Line contains a tab character. [FileTabCharacter]
17:18:07
[ERROR] 
/opt/buildagent/work/7bc1c54bc719b67c/modules/slf4j/src/main/java/org/apache/ignite/logger/slf4j/Slf4jLogger.java:53:1:
 Line contains a tab character. [FileTabCharacter]
17:18:07
[ERROR] 
/opt/buildagent/work/7bc1c54bc719b67c/modules/slf4j/src/main/java/org/apache/ignite/logger/slf4j/Slf4jLogger.java:54:1:
 Line contains a tab character. [FileTabCharacter]
17:18:07
[ERROR] 

[jira] [Commented] (IGNITE-13219) Slf4jLogger does not implement the LoggerNodeIdAware interface.

2020-07-06 Thread Ignite TC Bot (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-13219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17152069#comment-17152069
 ] 

Ignite TC Bot commented on IGNITE-13219:


{panel:title=Branch: [pull/7997/head] Base: [master] : Possible Blockers 
(114)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}
{color:#d04437}PDS (Indexing){color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443359]]

{color:#d04437}PDS 4{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443364]]

{color:#d04437}MVCC Cache 7{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443385]]

{color:#d04437}Platform .NET (Long Running){color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443369]]

{color:#d04437}Queries 1{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443371]]

{color:#d04437}ZooKeeper (Discovery) 1{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443320]]

{color:#d04437}PDS 3{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443363]]

{color:#d04437}PDS 2{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443362]]

{color:#d04437}PDS 1{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443361]]

{color:#d04437}MVCC PDS 2{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443389]]

{color:#d04437}MVCC PDS 4{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443391]]

{color:#d04437}Cache 5{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443348]]

{color:#d04437}Cache 7{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443350]]

{color:#d04437}SPI{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443313]]

{color:#d04437}Cache 2{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443345]]

{color:#d04437}ZooKeeper (Discovery) 2{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443321]]

{color:#d04437}Cache 6{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443349]]

{color:#d04437}Cache (Expiry Policy){color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443334]]

{color:#d04437}Examples{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443294]]

{color:#d04437}Streamers{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443311]]

{color:#d04437}Platform .NET{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443365]]

{color:#d04437}ZooKeeper (Discovery) 3{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443373]]

{color:#d04437}MVCC Queries{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443329]]

{color:#d04437}Scala (Examples){color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443318]]

{color:#d04437}Continuous Query 3{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443354]]

{color:#d04437}Thin Client: Java{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443304]]

{color:#d04437}Queries 2{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443308]]

{color:#d04437}Cache (Restarts) 1{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443341]]

{color:#d04437}Cache 9{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443352]]

{color:#d04437}Platform .NET (Core Linux){color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443366]]

{color:#d04437}Basic 3{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443325]]

{color:#d04437}MVCC PDS 1{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443388]]

{color:#d04437}Cache 1{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443344]]

{color:#d04437}Continuous Query 4{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443355]]

{color:#d04437}Cache 8{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443351]]

{color:#d04437}Platform C++ CMake (Linux Clang){color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443396]]

{color:#d04437}Start Nodes{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443312]]

{color:#d04437}Service Grid{color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=5443377]]

{color:#d04437}Cache (Deadlock Detection){color} [[tests 0 
CANCELLED|https://ci.ignite.apache.org/viewLog.html?buildId=544]]