[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2017-01-10 Thread Alexander K. (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15815008#comment-15815008
 ] 

Alexander K. commented on LOG4J2-1724:
--

It works as expected. Thanks.

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Fix For: 2.8
>
> Attachments: patchfile.txt, patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2017-01-09 Thread Remko Popma (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15811361#comment-15811361
 ] 

Remko Popma commented on LOG4J2-1724:
-

Nice!

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Fix For: 2.8
>
> Attachments: patchfile.txt, patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2017-01-09 Thread JIRA

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15811123#comment-15811123
 ] 

Mikael Ståldal commented on LOG4J2-1724:


OK. I managed to keep it gc-free with additional fields as long as they do not 
contain any substitution (i.e. not worse than before).

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Fix For: 2.8
>
> Attachments: patchfile.txt, patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2017-01-08 Thread Remko Popma (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15810161#comment-15810161
 ] 

Remko Popma commented on LOG4J2-1724:
-

For now I would just document that specifying additional fields in the 
configuration means it is no longer garbage-free.

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Fix For: 2.8
>
> Attachments: patchfile.txt, patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2017-01-08 Thread JIRA

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15809996#comment-15809996
 ] 

Mikael Ståldal commented on LOG4J2-1724:


I just realized that this renders GelfLayout non-gc-free if there are any 
additional fields, even if they have no strings to replace. Since 
StrSubstitutor is not gc-free.

[~rem...@yahoo.com] Do you know any easy way to fix this?

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Fix For: 2.8
>
> Attachments: patchfile.txt, patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2017-01-08 Thread JIRA

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15809921#comment-15809921
 ] 

Mikael Ståldal commented on LOG4J2-1724:


OK. Can you verify that it works as intended?

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Fix For: 2.8
>
> Attachments: patchfile.txt, patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2017-01-07 Thread Alexander K. (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15808905#comment-15808905
 ] 

Alexander K. commented on LOG4J2-1724:
--

Alexander Krasnostavsky

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Fix For: 2.8
>
> Attachments: patchfile.txt, patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2017-01-07 Thread JIRA

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15808196#comment-15808196
 ] 

Mikael Ståldal commented on LOG4J2-1724:


Yes.

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Fix For: 2.8
>
> Attachments: patchfile.txt, patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2017-01-06 Thread JIRA

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15804295#comment-15804295
 ] 

Mikael Ståldal commented on LOG4J2-1724:


[~alexkra] Do you have a full name to be mentioned in change log?

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Fix For: 2.8
>
> Attachments: patchfile.txt, patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2017-01-05 Thread Remko Popma (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15802809#comment-15802809
 ] 

Remko Popma commented on LOG4J2-1724:
-

(Haven't looked at patch.)
Is the documentation for the affected Layouts also updated? (Ideally with an 
example usage.)

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Fix For: 2.8
>
> Attachments: patchfile.txt, patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2017-01-05 Thread JIRA

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15802120#comment-15802120
 ] 

Mikael Ståldal commented on LOG4J2-1724:


I have done it.

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Fix For: 2.8
>
> Attachments: patchfile.txt, patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2017-01-05 Thread JIRA

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15801807#comment-15801807
 ] 

Mikael Ståldal commented on LOG4J2-1724:


I have now fixed builders. The patched should be adapted to current Git master.

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Attachments: patchfile.txt, patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2016-12-08 Thread JIRA

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15731576#comment-15731576
 ] 

Mikael Ståldal commented on LOG4J2-1724:


Yes, that would be a good idea. And the current factory method can be 
deprecated.

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Attachments: patchfile.txt, patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2016-12-07 Thread Ralph Goers (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15729363#comment-15729363
 ] 

Ralph Goers commented on LOG4J2-1724:
-

An ICLA is not required for patches. It is requested for larger contributions 
and it is required for a person to become a committer.  The reason for this is 
that when someone provides a patch then they are implicitly agreeing to provide 
the patch under the terms of the Apache license and are indicating that it is 
their own work. We request the CLA for larger contributions to confirm that the 
individual has the right to contribute it as it is more likely others may have 
helped. 

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Attachments: patchfile.txt, patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2016-12-07 Thread Gary Gregory (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15729139#comment-15729139
 ] 

Gary Gregory commented on LOG4J2-1724:
--

I think the code should switch to using builders.

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Attachments: patchfile.txt, patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2016-12-07 Thread JIRA

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15729106#comment-15729106
 ] 

Mikael Ståldal commented on LOG4J2-1724:


Thanks.

We should keep the current constructor and static factory method to avoid 
breaking binary compatibility.

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Attachments: patchfile.txt, patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2016-12-07 Thread JIRA

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15728208#comment-15728208
 ] 

Mikael Ståldal commented on LOG4J2-1724:


[~ralphgoers] can you answer this question about CLA?

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Attachments: patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2016-12-07 Thread Alexander K. (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15728198#comment-15728198
 ] 

Alexander K. commented on LOG4J2-1724:
--

Yes, I will do it. The reason of doing this on 2.6.2 is that the latest Spring 
Boot Log4j2 release is integrated with this version and they are going to 
upgrade to Log4j 2.7 only in the next major release and this will take couple 
of months.

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Attachments: patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2016-12-07 Thread Alexander K. (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15728190#comment-15728190
 ] 

Alexander K. commented on LOG4J2-1724:
--

No, I haven't. Is it must?

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Attachments: patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2016-12-07 Thread JIRA

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15728177#comment-15728177
 ] 

Mikael Ståldal commented on LOG4J2-1724:


Would it be possible for you to base the patch on 2.7, or even better the 
current master branch in Git?

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Attachments: patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2016-12-07 Thread JIRA

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15728175#comment-15728175
 ] 

Mikael Ståldal commented on LOG4J2-1724:


Thanks. Have you submitted an CLA to Apache?

http://apache.org/licenses/

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
> Attachments: patchfile.txt
>
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org



[jira] [Commented] (LOG4J2-1724) Using variables in GelfLayout's additional fields at runtime

2016-12-06 Thread JIRA

[ 
https://issues.apache.org/jira/browse/LOG4J2-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15724910#comment-15724910
 ] 

Mikael Ståldal commented on LOG4J2-1724:


Patches are welcome.

> Using variables in GelfLayout's additional fields at runtime
> 
>
> Key: LOG4J2-1724
> URL: https://issues.apache.org/jira/browse/LOG4J2-1724
> Project: Log4j 2
>  Issue Type: Improvement
>  Components: Layouts
>Affects Versions: 2.6.2, 2.7
>Reporter: Alexander K.
>Assignee: Mikael Ståldal
>
> Hello,
> I would like to suggest the following improvements for GelfLayout:
> 1. Using variables in additional fields at runtime. For example resolving 
> "value": "$$\{ctx:key\}" at runtime as it is done in other places. Thus, 
> custom lookups will be available as well.
> 2. Having an indicator includeThreadContext to control whether the contents 
> of the ThreadContext should be included. Sometimes it is usable to include 
> only some of its values and then it will be available using the first 
> suggested improvement by specific variable resolution.
> 3. Resolving HOST attribute in case it is not provided by using for example 
> InetAddress.getLocalHost().getHostName().
> Regards,
> Alexander



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org