Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

469
Visualizações
Lombok @Log4j2 annotation doesn't work in IntelliJ IDEA

I'm using Lombok library in my project and have a problem with @Log4j2 annotation. Not sure why but it's not generating log field in the class.

But when I'm changing annotation to @Slf4j it works, I can see it in IntelliJ IDEA 'Structure' tab.

I'm using gradle as a build tool. Have few dependencies"

dependencies {
    compileOnly("org.projectlombok:lombok")
    compile("org.springframework.boot:spring-boot-starter-log4j2")
}
over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

So I had the same problem, I think. What I did is I installed the Lombok plugin in IntelliJ, enabled the annotation as in the link under Preferences-> Build, Execution, Deployment > Compiler > Annotation Processors. And then I restarted IntelliJ, and it worked. IDE is able to recognize log.

I tried it for log4j, log4j2 and slf4j. It all worked.

Let me know if this helped.

over 4 years ago · Santiago Trujillo Relatório

0

Just installing the lombok plugin for intellij works for me.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda