Intellij 14 + lombok: @Slf4j Cannot find symbol log

13,469

Solution 1

Use lombok plugin for Intellij:

https://plugins.jetbrains.com/plugin/6317

This will highlight everything correctly and allow you to use auto completion for generated methods.

Note that some features (like @val) are supported in Intellij 14.1 and newer.

Solution 2

In Intellij version 2016, 2017, the enabling of

Preferences -> Compiler -> Annotation Processors

did not work for me.

The following additional checkbox did help: enter image description here

Solution 3

I had this problem when I upgraded to IntelliJ 2016.

I already had the Lombok plugin installed and Annotation Processors enabled.

I had to download a Lombok plugin from https://plugins.jetbrains.com/plugin/6317-lombok-plugin (0.15.16, as the most recent 0.15.17.2 wasn't compatible), then install it as a plugin to upgrade the installed Lombok plugin, then restart IntelliJ

Share:
13,469
youssef Liouene
Author by

youssef Liouene

Updated on June 12, 2022

Comments

  • youssef Liouene
    youssef Liouene almost 2 years

    Intellij doesn't recognize @SLF4J annotation. I have the following error:

    Error:(105, 9) java: cannot find symbol
    symbol:   variable log
    location: class com.xxxxx.SdsConfig
    

    knowing that I have already Enable annotation processing (Settings -> Compiler -> Annotation Processors)

    I use java 8 compiler.