#32 Make config file appenders and layouts application-extensible


See my feature request #31. It would be good if application software using log4cpp could have a hook to add new appenders and layouts for config files parsed by PropertyConfigurator.

If I write my own appender or layout class, it would be nice if my config file could specify it. All it would need would be a hook to recognise a particular name, and call the appropriate hook function to parse the config parameters.


  • Alexander Perepelkin

    Hello Craig,

    Thanks for your attention to log4cpp and this FR.

    Have you heard of the similar feature in log4j library? log4cpp project is designed to stay close to log4j (although log4j is moving forward much faster and log4cpp has only the basics)

  • jeremy mangin

    jeremy mangin - 2016-11-09

    Hello Alexander,

    I have the same question about how to add custom appenders with a properties config file ?

    I’ve seen in the log4cpp code that there is a factory mechanism in order to do that (using FactoryParams and AppendersFactory), and it seems to be an excellent way to instantiate appenders from config file. It was added in the ticket (closed) #22.

    My problem is that I can’t find how to load the config file and parse it as a FactoryParam. It seems that something is missing, but I can’t find what !

    Why these factories are not used ? Do you know how to complete these classes to allow the custom appenders use ?
    Or maybe there is already a way of doing that but I missed it?

    Thanks for your answer,



  • Alexander Perepelkin

    Hi Jeremy,

    Have you tried to make use of these classes?
    What makes you think that they are incomplete?


Log in to post a comment.