Hi Dongjin, I'd like to see this feature, but if I understand correctly, the KIP in its current form breaks a couple of Kafka APIs. For Kafka Connect it says "From log4j2, the name of the root logger becomes empty string from 'root'. It impacts Kafka connect's dynamic logging control feature. (And should be documented.)". This seems to imply that any tooling that a user might have written about logging in Kafka Connect will break because the client and server don't have a shared understanding of how to identify the root logger. The same would be true for the DescribeConfigs, AlterConfigs and IncrementalAlterConfigs protocols using the BROKER_LOGGER resource type, I think.
Maybe that's OK if the behaviour was changing in a new major release of Kafka (e.g. 3.0), but I don't think it's allowed in Kafka 2.7 given the project's compatibility requirements & semantic versioning. If these API compatibility issues are easily fixed I think it would be great to have this in 2.7, but if not it might be easier to target this for Kafka 3.0. That would also allow you to change the logging config format as suggested by Ismael. Many thanks, Tom On Tue, Sep 22, 2020 at 5:15 PM Dongjin Lee <dong...@apache.org> wrote: > Hi devs, > > I updated the KIP with the migration plan I discussed with Ismael. > > I think 2.7.0 is the perfect time for starting migration into log4j2. If we > miss this opportunity, the migration would be much harder. So please have a > look at this proposal. > > I also opened a voting thread for this. > > Thanks, > Dongjin > > On Thu, Sep 17, 2020 at 2:29 AM Dongjin Lee <dong...@apache.org> wrote: > > > Hi Ismael, > > > > > Have we considered switching to the log4j2 logging config format by > > default and providing a mechanism to use the old format? > > > > As of present, the proposal leaves the default config format switching to > > sometime in the future. However, I think it is not a difficult task and > is > > up to the community's decision. The draft implementation already includes > > log4j2 counterparts for all existing 1.x format (template) configs. > > Although it still uses traditional log4j format as a default for backward > > compatibility, the users who prefer the log4j2 configs can use it by > > setting `export > > KAFKA_LOG4J_OPTS="-Dlog4j.configurationFile={log4j2-config-file-path}"`. > > Whenever we change the default logging format, we must don't forget to > > switch this functionality to the reverse, i.e., making log4j 1.x format > > available as an opt-in. > > > > I am so concerned about the community's opinion when would be adequate to > > make the log4j2 config as default. > > > > Thanks, > > Dongjin > > > > +1. As a note, I have an almost-completed implementation of log4j2 > > equivalent for the log4j-appender. I think it would be great if this > > feature can be provided with changing the default logging config format. > > > > On Wed, Sep 16, 2020 at 11:49 PM Ismael Juma <ism...@juma.me.uk> wrote: > > > >> Thanks for the KIP, Dongjin. Have we considered switching to the log4j2 > >> logging config format by default and providing a mechanism to use the > old > >> format? It is likely that we will release 3.0 as the release after 2.7, > so > >> it would provide a good opportunity to move on from the legacy config > >> format. The other option is to stick with the old format for 3.0 and > >> migrate to the new format in 4.0. > >> > >> Ismael > >> > >> On Wed, Aug 5, 2020 at 7:45 AM Dongjin Lee <dong...@apache.org> wrote: > >> > >> > Hi, Kafka dev, > >> > > >> > I hope to initiate the discussion of KIP-653, upgrading log4j to > log4j2. > >> > > >> > > >> > > >> > https://cwiki.apache.org/confluence/display/KAFKA/KIP-653%3A+Upgrade+log4j+to+log4j2 > >> > > >> > All kinds of feedbacks are greatly appreciated! > >> > > >> > Best, > >> > Dongjin > >> > > >> > -- > >> > *Dongjin Lee* > >> > > >> > *A hitchhiker in the mathematical world.* > >> > > >> > > >> > > >> > > >> > *github: <http://goog_969573159/>github.com/dongjinleekr > >> > <https://github.com/dongjinleekr>keybase: > >> https://keybase.io/dongjinleekr > >> > <https://keybase.io/dongjinleekr>linkedin: > >> kr.linkedin.com/in/dongjinleekr > >> > <https://kr.linkedin.com/in/dongjinleekr>speakerdeck: > >> > speakerdeck.com/dongjin > >> > <https://speakerdeck.com/dongjin>* > >> > > >> > > > > > > -- > > *Dongjin Lee* > > > > *A hitchhiker in the mathematical world.* > > > > > > > > > > *github: <http://goog_969573159/>github.com/dongjinleekr > > <https://github.com/dongjinleekr>keybase: > https://keybase.io/dongjinleekr > > <https://keybase.io/dongjinleekr>linkedin: > kr.linkedin.com/in/dongjinleekr > > <https://kr.linkedin.com/in/dongjinleekr>speakerdeck: > speakerdeck.com/dongjin > > <https://speakerdeck.com/dongjin>* > > > > > -- > *Dongjin Lee* > > *A hitchhiker in the mathematical world.* > > > > > *github: <http://goog_969573159/>github.com/dongjinleekr > <https://github.com/dongjinleekr>keybase: https://keybase.io/dongjinleekr > <https://keybase.io/dongjinleekr>linkedin: kr.linkedin.com/in/dongjinleekr > <https://kr.linkedin.com/in/dongjinleekr>speakerdeck: > speakerdeck.com/dongjin > <https://speakerdeck.com/dongjin>* >