You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "ppkarwasz (via GitHub)" <gi...@apache.org> on 2023/01/26 20:01:14 UTC

[GitHub] [logging-log4j2] ppkarwasz commented on issue #1227: ERROR No appender references provided to AsyncAppender: appenderRefs

ppkarwasz commented on issue #1227:
URL: https://github.com/apache/logging-log4j2/issues/1227#issuecomment-1405572159

   @virajjasani,
   
   Try:
   
   ```
   appender.ASYA.$0.type = AppenderRef
   appender.ASYA.$0.ref = DRFA
   ```
   
   You chose probably the worst configuration format available. Log4j2 configuration is hierarchical, which can not be said of the properties format. The properties format basically follows these rules:
   
    * all properties and subcomponents of a Log4j2 component have the same prefix (in your case `appender.ASYA` for the asynchronous appender),
    * simple properties are specified as `prefix.property_name` (e.g. `appender.ASYA.blocking`),
    * subcomponents have a prefix of `parent_prefix.unique_id` (in my example `appender.ASYA.$0`), must have a `type` property (`appender.ASYA.$0.type = AppenderRef` in the example) and then you specify the subcomponent's properties as in the previous points.
   
   **Remark:** some subcomponents, such as layouts or filters have a hardcoded unique id.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org