You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by romanso123 <gi...@git.apache.org> on 2017/07/04 08:31:46 UTC

[GitHub] logging-log4j2 pull request #91: failing test - irregular log4j2.json nodes ...

GitHub user romanso123 opened a pull request:

    https://github.com/apache/logging-log4j2/pull/91

    failing test - irregular log4j2.json nodes order

    Failing test, showing that log4j2.json config file nodes specific order can fail log4j2 framework functionality.
    
    Test description:
     "properties" node in resources/log4j2.json config file is the last node (not regular json nodes order)
     due to this, log4j2 framework doesn't act normally
     this log msg is not printed correctly - "${layout}" is printed.
     if we set "properties" node to be before "appenders" node, everything will work as expected.
     why would json-node order matter? the nodes order in a JSON shouldn't matter ...

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/romanso123/logging-log4j2 failing_test_log4j2_json_nodes_order

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/logging-log4j2/pull/91.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #91
    
----
commit b11df691d3e520e7a71d6fd4d0aada092545407a
Author: romanso <ro...@il.ibm.com>
Date:   2017-07-04T08:27:13Z

    failing test - irregular log4j2.json nodes order

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] logging-log4j2 issue #91: failing test - irregular log4j2.json nodes order

Posted by mikaelstaldal <gi...@git.apache.org>.
Github user mikaelstaldal commented on the issue:

    https://github.com/apache/logging-log4j2/pull/91
  
    For https://issues.apache.org/jira/browse/LOG4J2-1933


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] logging-log4j2 issue #91: failing test - irregular log4j2.json nodes order

Posted by romanso123 <gi...@git.apache.org>.
Github user romanso123 commented on the issue:

    https://github.com/apache/logging-log4j2/pull/91
  
    Yea, saw that.
    But still... in general, a JSON is not supposed to have order..
    In my opinion this design is flawed.
    Anyway you decide what to do with it.
    
    Thanks.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] logging-log4j2 issue #91: failing test - irregular log4j2.json nodes order

Posted by rgoers <gi...@git.apache.org>.
Github user rgoers commented on the issue:

    https://github.com/apache/logging-log4j2/pull/91
  
    After a bunch of interesting reading it appears that ES2015 says that Object property names are to be ordered in the following way: integer-like Strings in ascending order, non-integer-like Strings in creation order, Symbols in creation order.
    
    Since Log4j doesn't use integer-like Strings as property names we can reasonably expect our JSON to be in the order it was specified (which is exactly what we get with Jackson).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] logging-log4j2 issue #91: failing test - irregular log4j2.json nodes order

Posted by waymirec <gi...@git.apache.org>.
Github user waymirec commented on the issue:

    https://github.com/apache/logging-log4j2/pull/91
  
    After a bunch of interesting reading it appears that ES2015 says that Object property names are to be ordered in the following way:  integer-like Strings in ascending order, non-integer-like Strings in creation order, Symbols in creation order. 
    
    Since Log4j doesn't use integer-like Strings as property names we can reasonably expect our JSON to be in the order it was specified (which is exactly what we get with Jackson).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] logging-log4j2 issue #91: failing test - irregular log4j2.json nodes order

Posted by jochenw <gi...@git.apache.org>.
Github user jochenw commented on the issue:

    https://github.com/apache/logging-log4j2/pull/91
  
    Quoting Ralph Goers:
    
    This is not a bug but is intentional. Log4j processes configuration files from beginning to end. It does not scan the file twice as would be necessary if no order was required. Properties MUST come first so that they can be used by the configuration that follows. Because of that we will generate an error if the properties are encountered after some other element is found.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---