[jira] [Commented] (HBASE-10092) Move up on to log4j2

2017-12-18 Thread Matt Sicker (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-10092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16296043#comment-16296043
 ] 

Matt Sicker commented on HBASE-10092:
-

You can take a rewrite appender 
 
and rewrite the log level when the marker is present. Looking more closely, I 
don't see a built in way to do it, but a custom plugin isn't too hard.

Another option would be some more complicated use of pattern layout 
 to 
replace the log level with the simple marker name if defined and equal to 
FATAL. Pattern layouts are super powerful though not quite Turing complete yet. 
;)

> Move up on to log4j2
> 
>
> Key: HBASE-10092
> URL: https://issues.apache.org/jira/browse/HBASE-10092
> Project: HBase
>  Issue Type: Sub-task
>Reporter: stack
>Assignee: Balazs Meszaros
>Priority: Critical
> Fix For: 2.0.0-beta-1
>
> Attachments: 10092.txt, 10092v2.txt, HBASE-10092-preview-v0.patch, 
> HBASE-10092.master.001.patch, HBASE-10092.master.002.patch, HBASE-10092.patch
>
>
> Allows logging with less friction.  See http://logging.apache.org/log4j/2.x/  
> This rather radical transition can be done w/ minor change given they have an 
> adapter for apache's logging, the one we use.  They also have and adapter for 
> slf4j so we likely can remove at least some of the 4 versions of this module 
> our dependencies make use of.
> I made a start in attached patch but am currently stuck in maven dependency 
> resolve hell courtesy of our slf4j.  Fixing will take some concentration and 
> a good net connection, an item I currently lack.  Other TODOs are that will 
> need to fix our little log level setting jsp page -- will likely have to undo 
> our use of hadoop's tool here -- and the config system changes a little.
> I will return to this project soon.  Will bring numbers.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-10092) Move up on to log4j2

2017-12-18 Thread Matt Sicker (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-10092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16295998#comment-16295998
 ] 

Matt Sicker commented on HBASE-10092:
-

If you use parameterized log messages (the curly brace placeholders), you can 
usually get away with not using guards around the log statements. I'm not sure 
if slf4j-api supports it, but log4j-api allows you to use lambdas (or just 
anonymous classes if using Java 7) to log a message that requires computation 
other than the message formatting.

As for a fatal marker, you can even rewrite those logs via a log4j2 config to 
use the fatal log level. Otherwise, I'd suggest a less confusing marker name so 
it's not confused with a level. Something like "crash" could work?

> Move up on to log4j2
> 
>
> Key: HBASE-10092
> URL: https://issues.apache.org/jira/browse/HBASE-10092
> Project: HBase
>  Issue Type: Sub-task
>Reporter: stack
>Assignee: Balazs Meszaros
>Priority: Critical
> Fix For: 2.0.0-beta-1
>
> Attachments: 10092.txt, 10092v2.txt, HBASE-10092-preview-v0.patch, 
> HBASE-10092.master.001.patch, HBASE-10092.master.002.patch, HBASE-10092.patch
>
>
> Allows logging with less friction.  See http://logging.apache.org/log4j/2.x/  
> This rather radical transition can be done w/ minor change given they have an 
> adapter for apache's logging, the one we use.  They also have and adapter for 
> slf4j so we likely can remove at least some of the 4 versions of this module 
> our dependencies make use of.
> I made a start in attached patch but am currently stuck in maven dependency 
> resolve hell courtesy of our slf4j.  Fixing will take some concentration and 
> a good net connection, an item I currently lack.  Other TODOs are that will 
> need to fix our little log level setting jsp page -- will likely have to undo 
> our use of hadoop's tool here -- and the config system changes a little.
> I will return to this project soon.  Will bring numbers.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-10092) Move up on to log4j2

2017-07-22 Thread Matt Sicker (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-10092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16097417#comment-16097417
 ] 

Matt Sicker commented on HBASE-10092:
-

Added a link to LOG4J2-63 for log4j1 config format support.

> Move up on to log4j2
> 
>
> Key: HBASE-10092
> URL: https://issues.apache.org/jira/browse/HBASE-10092
> Project: HBase
>  Issue Type: Sub-task
>Reporter: stack
>Assignee: Alex Newman
>Priority: Critical
> Fix For: 2.0.0
>
> Attachments: 10092.txt, 10092v2.txt, HBASE-10092.patch, 
> HBASE-10092-preview-v0.patch
>
>
> Allows logging with less friction.  See http://logging.apache.org/log4j/2.x/  
> This rather radical transition can be done w/ minor change given they have an 
> adapter for apache's logging, the one we use.  They also have and adapter for 
> slf4j so we likely can remove at least some of the 4 versions of this module 
> our dependencies make use of.
> I made a start in attached patch but am currently stuck in maven dependency 
> resolve hell courtesy of our slf4j.  Fixing will take some concentration and 
> a good net connection, an item I currently lack.  Other TODOs are that will 
> need to fix our little log level setting jsp page -- will likely have to undo 
> our use of hadoop's tool here -- and the config system changes a little.
> I will return to this project soon.  Will bring numbers.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (HBASE-10092) Move up on to log4j2

2014-08-18 Thread Matt Sicker (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-10092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14101667#comment-14101667
 ] 

Matt Sicker commented on HBASE-10092:
-

If support for properties files is that important, vote for LOG4J2-635. I 
personally find them horribly confusing to use in comparison with the 
XML/JSON/YAML formats, but it seems to be a desired feature.

Otherwise, you can create a custom ConfigurationFactory to do your own config 
file parsing and delegation.

 Move up on to log4j2
 

 Key: HBASE-10092
 URL: https://issues.apache.org/jira/browse/HBASE-10092
 Project: HBase
  Issue Type: Sub-task
Reporter: stack
Assignee: Alex Newman
 Fix For: 2.0.0

 Attachments: 10092.txt, 10092v2.txt, HBASE-10092.patch


 Allows logging with less friction.  See http://logging.apache.org/log4j/2.x/  
 This rather radical transition can be done w/ minor change given they have an 
 adapter for apache's logging, the one we use.  They also have and adapter for 
 slf4j so we likely can remove at least some of the 4 versions of this module 
 our dependencies make use of.
 I made a start in attached patch but am currently stuck in maven dependency 
 resolve hell courtesy of our slf4j.  Fixing will take some concentration and 
 a good net connection, an item I currently lack.  Other TODOs are that will 
 need to fix our little log level setting jsp page -- will likely have to undo 
 our use of hadoop's tool here -- and the config system changes a little.
 I will return to this project soon.  Will bring numbers.
  



--
This message was sent by Atlassian JIRA
(v6.2#6252)