[jira] [Commented] (LOG4J2-3388) Migration from log4j1.x to log4j2.x

2022-02-19 Thread Ralph Goers (Jira)


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

Ralph Goers commented on LOG4J2-3388:
-

I am going to mark this ticket as resolved. It contains multiple topics but no 
problem to be solved. This would be better handled on the Log4j user's mailing 
list.

> Migration from log4j1.x to log4j2.x
> ---
>
> Key: LOG4J2-3388
> URL: https://issues.apache.org/jira/browse/LOG4J2-3388
> Project: Log4j 2
>  Issue Type: Question
>Reporter: Janardhan Naidu
>Priority: Major
>
> We are planning to upgrade log4j1.x to log4j2.x.
> So we went through the migration document: 
> [https://logging.apache.org/log4j/2.x/manual/migration.html] 
> in the above document, It says that (They must not access methods and classes 
> internal to the Log4j 1.x implementation such as Appenders, LoggerRepository 
> or Category’s callAppenders method.) 
> and In our product, currently we are using log4j1.x and we are extending some 
> of the log4j1.x classes like PatternParser, FileAppender etc... which were 
> made final in log4j2.x  so can we make use of Log4j 1.x bridge.?  If yes how 
> we can do that.
>  
> what could be the better option to migrate log4j 1.x to log4j 2.x as we are 
> making use of log4j internal classes? 
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (LOG4J2-3388) Migration from log4j1.x to log4j2.x

2022-02-17 Thread Piotr P. Karwasz (Jira)


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

Piotr P. Karwasz commented on LOG4J2-3388:
--

I think the problem you are having is caused by different conventions used to 
translate component configuration from the XML format to the properties format:
 * most complex components such as appenders and filters use the 
{{parent_prefix.component_id.property}} syntax. If {{property}} contains a dot 
it is a subcomponent, otherwise an attribute. {{component_id}} can not contain 
dots. For example:

{noformat}
# You can choose <1234> arbitrarily, type is an attribute
appender.<1234>.type = RollingFile
# 'layout.type' contains a dot -> it is a subcomponent
# however the identifier 'layout' is hardcoded.
appender.<1234>.layout.type = PatternLayout
# '.type' contains a dot -> it is a subcomponent
# the identifier `` is arbitrary.
appender.<1234>..type = TimeBasedTriggeringPolicy
{noformat}
 * simple key/value components such as custom levels and properties use a 
shorthand notation {{parent_prefix.key.with.dots=value}} and the other notation 
is not supported. E.g.:

{noformat}
customLevel.My very "fancy" custom level.with.dots=1000
{noformat}

> Migration from log4j1.x to log4j2.x
> ---
>
> Key: LOG4J2-3388
> URL: https://issues.apache.org/jira/browse/LOG4J2-3388
> Project: Log4j 2
>  Issue Type: Question
>Reporter: Janardhan Naidu
>Priority: Major
>
> We are planning to upgrade log4j1.x to log4j2.x.
> So we went through the migration document: 
> [https://logging.apache.org/log4j/2.x/manual/migration.html] 
> in the above document, It says that (They must not access methods and classes 
> internal to the Log4j 1.x implementation such as Appenders, LoggerRepository 
> or Category’s callAppenders method.) 
> and In our product, currently we are using log4j1.x and we are extending some 
> of the log4j1.x classes like PatternParser, FileAppender etc... which were 
> made final in log4j2.x  so can we make use of Log4j 1.x bridge.?  If yes how 
> we can do that.
>  
> what could be the better option to migrate log4j 1.x to log4j 2.x as we are 
> making use of log4j internal classes? 
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (LOG4J2-3388) Migration from log4j1.x to log4j2.x

2022-02-17 Thread Janardhan Naidu (Jira)


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

Janardhan Naidu commented on LOG4J2-3388:
-

deleted the pull request as it will cause compilation issue. 

 

for now, it is working for me with below configuration which is slightly 
different compare to how we define these properties in xml file. So need to fix 
it? please have a look at it. 

customLevels = VERBOSE
customLevel.VERBOSE=525

> Migration from log4j1.x to log4j2.x
> ---
>
> Key: LOG4J2-3388
> URL: https://issues.apache.org/jira/browse/LOG4J2-3388
> Project: Log4j 2
>  Issue Type: Question
>Reporter: Janardhan Naidu
>Priority: Major
>
> We are planning to upgrade log4j1.x to log4j2.x.
> So we went through the migration document: 
> [https://logging.apache.org/log4j/2.x/manual/migration.html] 
> in the above document, It says that (They must not access methods and classes 
> internal to the Log4j 1.x implementation such as Appenders, LoggerRepository 
> or Category’s callAppenders method.) 
> and In our product, currently we are using log4j1.x and we are extending some 
> of the log4j1.x classes like PatternParser, FileAppender etc... which were 
> made final in log4j2.x  so can we make use of Log4j 1.x bridge.?  If yes how 
> we can do that.
>  
> what could be the better option to migrate log4j 1.x to log4j 2.x as we are 
> making use of log4j internal classes? 
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (LOG4J2-3388) Migration from log4j1.x to log4j2.x

2022-02-16 Thread Janardhan Naidu (Jira)


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

Janardhan Naidu commented on LOG4J2-3388:
-

Just changed the title with ticket number. 

> Migration from log4j1.x to log4j2.x
> ---
>
> Key: LOG4J2-3388
> URL: https://issues.apache.org/jira/browse/LOG4J2-3388
> Project: Log4j 2
>  Issue Type: Question
>Reporter: Janardhan Naidu
>Priority: Major
>
> We are planning to upgrade log4j1.x to log4j2.x.
> So we went through the migration document: 
> [https://logging.apache.org/log4j/2.x/manual/migration.html] 
> in the above document, It says that (They must not access methods and classes 
> internal to the Log4j 1.x implementation such as Appenders, LoggerRepository 
> or Category’s callAppenders method.) 
> and In our product, currently we are using log4j1.x and we are extending some 
> of the log4j1.x classes like PatternParser, FileAppender etc... which were 
> made final in log4j2.x  so can we make use of Log4j 1.x bridge.?  If yes how 
> we can do that.
>  
> what could be the better option to migrate log4j 1.x to log4j 2.x as we are 
> making use of log4j internal classes? 
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (LOG4J2-3388) Migration from log4j1.x to log4j2.x

2022-02-16 Thread Piotr P. Karwasz (Jira)


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

Piotr P. Karwasz commented on LOG4J2-3388:
--

[~janardhan.naidu]: if you add {{[LOG4J2-3388]}} to the pull request title, it 
will be linked with this issue report.

> Migration from log4j1.x to log4j2.x
> ---
>
> Key: LOG4J2-3388
> URL: https://issues.apache.org/jira/browse/LOG4J2-3388
> Project: Log4j 2
>  Issue Type: Question
>Reporter: Janardhan Naidu
>Priority: Major
>
> We are planning to upgrade log4j1.x to log4j2.x.
> So we went through the migration document: 
> [https://logging.apache.org/log4j/2.x/manual/migration.html] 
> in the above document, It says that (They must not access methods and classes 
> internal to the Log4j 1.x implementation such as Appenders, LoggerRepository 
> or Category’s callAppenders method.) 
> and In our product, currently we are using log4j1.x and we are extending some 
> of the log4j1.x classes like PatternParser, FileAppender etc... which were 
> made final in log4j2.x  so can we make use of Log4j 1.x bridge.?  If yes how 
> we can do that.
>  
> what could be the better option to migrate log4j 1.x to log4j 2.x as we are 
> making use of log4j internal classes? 
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (LOG4J2-3388) Migration from log4j1.x to log4j2.x

2022-02-16 Thread Janardhan Naidu (Jira)


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

Janardhan Naidu commented on LOG4J2-3388:
-

HI Team, 

for the custom log level issue which I shared in above comments, I think code 
changes are required in log4j side.  I just created a pull request please 
review and merge it . and let me know in which version we can expect the 
changes. 

[https://github.com/apache/logging-log4j2/pull/758/files] 

 

Thanks

Janardhan

> Migration from log4j1.x to log4j2.x
> ---
>
> Key: LOG4J2-3388
> URL: https://issues.apache.org/jira/browse/LOG4J2-3388
> Project: Log4j 2
>  Issue Type: Question
>Reporter: Janardhan Naidu
>Priority: Major
>
> We are planning to upgrade log4j1.x to log4j2.x.
> So we went through the migration document: 
> [https://logging.apache.org/log4j/2.x/manual/migration.html] 
> in the above document, It says that (They must not access methods and classes 
> internal to the Log4j 1.x implementation such as Appenders, LoggerRepository 
> or Category’s callAppenders method.) 
> and In our product, currently we are using log4j1.x and we are extending some 
> of the log4j1.x classes like PatternParser, FileAppender etc... which were 
> made final in log4j2.x  so can we make use of Log4j 1.x bridge.?  If yes how 
> we can do that.
>  
> what could be the better option to migrate log4j 1.x to log4j 2.x as we are 
> making use of log4j internal classes? 
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (LOG4J2-3388) Migration from log4j1.x to log4j2.x

2022-02-16 Thread Janardhan Naidu (Jira)


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

Janardhan Naidu commented on LOG4J2-3388:
-

I am using log4j 2.17.1 version. 

> Migration from log4j1.x to log4j2.x
> ---
>
> Key: LOG4J2-3388
> URL: https://issues.apache.org/jira/browse/LOG4J2-3388
> Project: Log4j 2
>  Issue Type: Question
>Reporter: Janardhan Naidu
>Priority: Major
>
> We are planning to upgrade log4j1.x to log4j2.x.
> So we went through the migration document: 
> [https://logging.apache.org/log4j/2.x/manual/migration.html] 
> in the above document, It says that (They must not access methods and classes 
> internal to the Log4j 1.x implementation such as Appenders, LoggerRepository 
> or Category’s callAppenders method.) 
> and In our product, currently we are using log4j1.x and we are extending some 
> of the log4j1.x classes like PatternParser, FileAppender etc... which were 
> made final in log4j2.x  so can we make use of Log4j 1.x bridge.?  If yes how 
> we can do that.
>  
> what could be the better option to migrate log4j 1.x to log4j 2.x as we are 
> making use of log4j internal classes? 
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (LOG4J2-3388) Migration from log4j1.x to log4j2.x

2022-02-16 Thread Janardhan Naidu (Jira)


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

Janardhan Naidu commented on LOG4J2-3388:
-

[~ggregory] , No. there is no whitespaces after 525

> Migration from log4j1.x to log4j2.x
> ---
>
> Key: LOG4J2-3388
> URL: https://issues.apache.org/jira/browse/LOG4J2-3388
> Project: Log4j 2
>  Issue Type: Question
>Reporter: Janardhan Naidu
>Priority: Major
>
> We are planning to upgrade log4j1.x to log4j2.x.
> So we went through the migration document: 
> [https://logging.apache.org/log4j/2.x/manual/migration.html] 
> in the above document, It says that (They must not access methods and classes 
> internal to the Log4j 1.x implementation such as Appenders, LoggerRepository 
> or Category’s callAppenders method.) 
> and In our product, currently we are using log4j1.x and we are extending some 
> of the log4j1.x classes like PatternParser, FileAppender etc... which were 
> made final in log4j2.x  so can we make use of Log4j 1.x bridge.?  If yes how 
> we can do that.
>  
> what could be the better option to migrate log4j 1.x to log4j 2.x as we are 
> making use of log4j internal classes? 
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (LOG4J2-3388) Migration from log4j1.x to log4j2.x

2022-02-16 Thread Gary D. Gregory (Jira)


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

Gary D. Gregory commented on LOG4J2-3388:
-

Do you have whitespace at the end of the lines in the prop file?

> Migration from log4j1.x to log4j2.x
> ---
>
> Key: LOG4J2-3388
> URL: https://issues.apache.org/jira/browse/LOG4J2-3388
> Project: Log4j 2
>  Issue Type: Question
>Reporter: Janardhan Naidu
>Priority: Major
>
> We are planning to upgrade log4j1.x to log4j2.x.
> So we went through the migration document: 
> [https://logging.apache.org/log4j/2.x/manual/migration.html] 
> in the above document, It says that (They must not access methods and classes 
> internal to the Log4j 1.x implementation such as Appenders, LoggerRepository 
> or Category’s callAppenders method.) 
> and In our product, currently we are using log4j1.x and we are extending some 
> of the log4j1.x classes like PatternParser, FileAppender etc... which were 
> made final in log4j2.x  so can we make use of Log4j 1.x bridge.?  If yes how 
> we can do that.
>  
> what could be the better option to migrate log4j 1.x to log4j 2.x as we are 
> making use of log4j internal classes? 
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (LOG4J2-3388) Migration from log4j1.x to log4j2.x

2022-02-16 Thread Janardhan Naidu (Jira)


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

Janardhan Naidu commented on LOG4J2-3388:
-

HI, 

 

I am now migrating to log4j2.x, now facing one issue while implementing 
customer log levels, please help here.

 

*in java code:*

final Logger logger = LogManager.getLogger();

Level lev = Level.toLevel("ALWAYS"); 

logger.log(lev, " from custom level Always."); 

 

*in log4j2.properties:*

customLevels = ALWAYS

customLevel.ALWAYS.name = ALWAYS
customLevel.ALWAYS.value = 525

 

I am not getting the logs printed, instead getting number format error,

 

Exception in thread "main" *java.lang.NumberFormatException: For input string: 
"ALWAYS"*
    at java.lang.NumberFormatException.forInputString(Unknown Source)
    at java.lang.Integer.parseInt(Unknown Source)
    at java.lang.Integer.parseInt(Unknown Source)
    at 
org.apache.logging.log4j.core.config.properties.PropertiesConfigurationBuilder.build(PropertiesConfigurationBuilder.java:126)
    at 
org.apache.logging.log4j.core.config.properties.PropertiesConfigurationFactory.getConfiguration(PropertiesConfigurationFactory.java:56)
    at 
org.apache.logging.log4j.core.config.properties.PropertiesConfigurationFactory.getConfiguration(PropertiesConfigurationFactory.java:35)
    at 
org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:557)
    at 
org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:481)
    at 
org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:323)
    at 
org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:695)
    at 
org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:716)
    at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:270)
    at 
org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:245)
    at 
org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47)
    at org.apache.logging.log4j.LogManager.getContext(LogManager.java:176)
    at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:666)

Thanks

Janardhan 

> Migration from log4j1.x to log4j2.x
> ---
>
> Key: LOG4J2-3388
> URL: https://issues.apache.org/jira/browse/LOG4J2-3388
> Project: Log4j 2
>  Issue Type: Question
>Reporter: Janardhan Naidu
>Priority: Major
>
> We are planning to upgrade log4j1.x to log4j2.x.
> So we went through the migration document: 
> [https://logging.apache.org/log4j/2.x/manual/migration.html] 
> in the above document, It says that (They must not access methods and classes 
> internal to the Log4j 1.x implementation such as Appenders, LoggerRepository 
> or Category’s callAppenders method.) 
> and In our product, currently we are using log4j1.x and we are extending some 
> of the log4j1.x classes like PatternParser, FileAppender etc... which were 
> made final in log4j2.x  so can we make use of Log4j 1.x bridge.?  If yes how 
> we can do that.
>  
> what could be the better option to migrate log4j 1.x to log4j 2.x as we are 
> making use of log4j internal classes? 
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (LOG4J2-3388) Migration from log4j1.x to log4j2.x

2022-02-03 Thread Piotr P. Karwasz (Jira)


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

Piotr P. Karwasz commented on LOG4J2-3388:
--

[~janardhan.naidu],

Sorry, I meant 
[AbstractOutputStreamAppender|https://logging.apache.org/log4j/2.x/log4j-core/apidocs/org/apache/logging/log4j/core/appender/AbstractOutputStreamAppender.html],
 which is the base class of most appenders.

> Migration from log4j1.x to log4j2.x
> ---
>
> Key: LOG4J2-3388
> URL: https://issues.apache.org/jira/browse/LOG4J2-3388
> Project: Log4j 2
>  Issue Type: Question
>Reporter: Janardhan Naidu
>Priority: Major
>
> We are planning to upgrade log4j1.x to log4j2.x.
> So we went through the migration document: 
> [https://logging.apache.org/log4j/2.x/manual/migration.html] 
> in the above document, It says that (They must not access methods and classes 
> internal to the Log4j 1.x implementation such as Appenders, LoggerRepository 
> or Category’s callAppenders method.) 
> and In our product, currently we are using log4j1.x and we are extending some 
> of the log4j1.x classes like PatternParser, FileAppender etc... which were 
> made final in log4j2.x  so can we make use of Log4j 1.x bridge.?  If yes how 
> we can do that.
>  
> what could be the better option to migrate log4j 1.x to log4j 2.x as we are 
> making use of log4j internal classes? 
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (LOG4J2-3388) Migration from log4j1.x to log4j2.x

2022-02-03 Thread Ralph Goers (Jira)


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

Ralph Goers commented on LOG4J2-3388:
-

As I said, we have helped many users over the years. If you could simply tell 
us what you are needing to do we can tell you how to do it.

> Migration from log4j1.x to log4j2.x
> ---
>
> Key: LOG4J2-3388
> URL: https://issues.apache.org/jira/browse/LOG4J2-3388
> Project: Log4j 2
>  Issue Type: Question
>Reporter: Janardhan Naidu
>Priority: Major
>
> We are planning to upgrade log4j1.x to log4j2.x.
> So we went through the migration document: 
> [https://logging.apache.org/log4j/2.x/manual/migration.html] 
> in the above document, It says that (They must not access methods and classes 
> internal to the Log4j 1.x implementation such as Appenders, LoggerRepository 
> or Category’s callAppenders method.) 
> and In our product, currently we are using log4j1.x and we are extending some 
> of the log4j1.x classes like PatternParser, FileAppender etc... which were 
> made final in log4j2.x  so can we make use of Log4j 1.x bridge.?  If yes how 
> we can do that.
>  
> what could be the better option to migrate log4j 1.x to log4j 2.x as we are 
> making use of log4j internal classes? 
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (LOG4J2-3388) Migration from log4j1.x to log4j2.x

2022-02-03 Thread Janardhan Naidu (Jira)


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

Janardhan Naidu commented on LOG4J2-3388:
-

Thank you both for real quick response.  

[~ppkarwasz] ,  
[OutputStreamAppender|https://logging.apache.org/log4j/2.x/log4j-core/apidocs/org/apache/logging/log4j/core/appender/OutputStreamAppender.html]
  is also final!.. We cannot extend it.. 

[~rgoers] , you are correct, we need to remove 1.x and move to 2.x completely. 
can you please provide the documentation where I can refer and configure 
appenders(file apender/rolling appender), Patter parsers etc, that you be 
really helpful. 

> Migration from log4j1.x to log4j2.x
> ---
>
> Key: LOG4J2-3388
> URL: https://issues.apache.org/jira/browse/LOG4J2-3388
> Project: Log4j 2
>  Issue Type: Question
>Reporter: Janardhan Naidu
>Priority: Major
>
> We are planning to upgrade log4j1.x to log4j2.x.
> So we went through the migration document: 
> [https://logging.apache.org/log4j/2.x/manual/migration.html] 
> in the above document, It says that (They must not access methods and classes 
> internal to the Log4j 1.x implementation such as Appenders, LoggerRepository 
> or Category’s callAppenders method.) 
> and In our product, currently we are using log4j1.x and we are extending some 
> of the log4j1.x classes like PatternParser, FileAppender etc... which were 
> made final in log4j2.x  so can we make use of Log4j 1.x bridge.?  If yes how 
> we can do that.
>  
> what could be the better option to migrate log4j 1.x to log4j 2.x as we are 
> making use of log4j internal classes? 
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (LOG4J2-3388) Migration from log4j1.x to log4j2.x

2022-02-02 Thread Ralph Goers (Jira)


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

Ralph Goers commented on LOG4J2-3388:
-

Ultimately you will want to migrate fully to log4j2. Using the log4j 1.x bridge 
can be used to help you start the conversion but should not be where you end up.

If you have a lot of applications and log4j configuration files then using the 
bridge is a good choice just to get the log4j 1.x jar out of the picture. 
However, it is quite possible you may not even need your custom extensions in 
Log4j 2. If you can describe what your extensions are for we can probably 
advise you on the best approach. For example, many people extended 
PatternParser to add their own pattern converters. That is not necessary in 
Log4j 2 as all PatternConverters are plugins in Log4j2 and are detected 
automatically. 

There are at least 36 Jira issues related to the 1.2 migration bridge being 
resolved in the upcoming release which should help address many of the issues 
with using the classes you mention, but it may not address them all. 

> Migration from log4j1.x to log4j2.x
> ---
>
> Key: LOG4J2-3388
> URL: https://issues.apache.org/jira/browse/LOG4J2-3388
> Project: Log4j 2
>  Issue Type: Question
>Reporter: Janardhan Naidu
>Priority: Major
>
> We are planning to upgrade log4j1.x to log4j2.x.
> So we went through the migration document: 
> [https://logging.apache.org/log4j/2.x/manual/migration.html] 
> in the above document, It says that (They must not access methods and classes 
> internal to the Log4j 1.x implementation such as Appenders, LoggerRepository 
> or Category’s callAppenders method.) 
> and In our product, currently we are using log4j1.x and we are extending some 
> of the log4j1.x classes like PatternParser, FileAppender etc... which were 
> made final in log4j2.x  so can we make use of Log4j 1.x bridge.?  If yes how 
> we can do that.
>  
> what could be the better option to migrate log4j 1.x to log4j 2.x as we are 
> making use of log4j internal classes? 
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (LOG4J2-3388) Migration from log4j1.x to log4j2.x

2022-02-02 Thread Piotr P. Karwasz (Jira)


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

Piotr P. Karwasz commented on LOG4J2-3388:
--

All depends on the kind of customizations you made. For the classes you mention:
 * {{PatternParser}} is {{{}final{}}}, but you can add patterns as plugins: the 
plugin must implement 
[PatternConverter|https://logging.apache.org/log4j/2.x/log4j-core/apidocs/org/apache/logging/log4j/core/pattern/PatternConverter.html],
 * {{FileAppender}} basically contains just the configuration logic and an 
{{OutputStream}} factory method. 
[OutputStreamAppender|https://logging.apache.org/log4j/2.x/log4j-core/apidocs/org/apache/logging/log4j/core/appender/OutputStreamAppender.html]
 is the real horse behind it. You can extend the latter.

 

> Migration from log4j1.x to log4j2.x
> ---
>
> Key: LOG4J2-3388
> URL: https://issues.apache.org/jira/browse/LOG4J2-3388
> Project: Log4j 2
>  Issue Type: Question
>Reporter: Janardhan Naidu
>Priority: Major
>
> We are planning to upgrade log4j1.x to log4j2.x.
> So we went through the migration document: 
> [https://logging.apache.org/log4j/2.x/manual/migration.html] 
> in the above document, It says that (They must not access methods and classes 
> internal to the Log4j 1.x implementation such as Appenders, LoggerRepository 
> or Category’s callAppenders method.) 
> and In our product, currently we are using log4j1.x and we are extending some 
> of the log4j1.x classes like PatternParser, FileAppender etc... which were 
> made final in log4j2.x  so can we make use of Log4j 1.x bridge.?  If yes how 
> we can do that.
>  
> what could be the better option to migrate log4j 1.x to log4j 2.x as we are 
> making use of log4j internal classes? 
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)