Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building with Lombok's @Slf4j and Eclipse: Cannot find symbol log

I have the lombok plugin in Eclipse and enabled annotation processing in Eclipse under java compiler, but still it is unable to recognize the log statements when I use @Slf4j annotation.

Do we have to make any other settings?

like image 599
bashwin Avatar asked May 18 '13 18:05

bashwin


People also ask

What does @Slf4j annotation do?

Annotation Type Slf4jCauses lombok to generate a logger field. Complete documentation is found at the project lombok features page for lombok log annotations. This annotation is valid for classes and enumerations.

Why Lombok is not working in Eclipse?

Eclipse 2020-12 (Eclipse 2020-12 Java) does not support Lombok. It runs fine, but the IDE shows errors for all Lombok generates getters/setters. The previous version of Eclipse work fine. You have to install lombok on your installation, otherwise Eclipse will not be able to handle the Lombok-Annotations.


1 Answers

You also have to install Lombok into Eclipse.

See also this answer on how to do that or check if Lombok is installed correctly.

Full Disclosure: I am one of the Project Lombok developers.

like image 130
Roel Spilker Avatar answered Sep 20 '22 14:09

Roel Spilker