[ 
https://issues.apache.org/jira/browse/LOG4J2-3388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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
# '<foo_bar_baz>.type' contains a dot -> it is a subcomponent
# the identifier `<foo_bar_baz>` is arbitrary.
appender.<1234>.<foo_bar_baz>.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)

Reply via email to