简体   繁体   English

LOGGER.info 和 LOGGER.debug 显示为红色,无法解析方法

[英]LOGGER.info and LOGGER.debug showing in red with cannot resolve method

Fixed固定的

I tried reinstalling the plugin but that didn't work so i completely cleared my inteljii idea and installed it again and it seems to be working.我尝试重新安装插件,但没有用,所以我完全清除了我的 inteljii 想法并再次安装它,它似乎正在工作。 Not sure what the issue was really.不确定问题到底是什么。

LOGGER.info and LOGGER.debug showing in red in IntelliJ idea with the message cannot resolve method , while everything else lombok related seems to be working. LOGGER.infoLOGGER.debug在红色的IntelliJ IDEA显示该消息cannot resolve method ,而一切lombok相关的似乎是工作。

Version information:版本信息:

IDEA Version: IntelliJ IDEA 2019.1.1 (Ultimate Edition)
Build #IU-191.6707.61, built on April 16, 2019
JDK Version: 1.8.0_201
OS Type & Version: Ubuntu 18.04.2 LTS
Lombok Plugin Version: v0.25-2019.1
Lombok Dependency Version: 1.16.18

Additional information:附加信息:

  • Annotation processing under Compiler is enabled CompilerAnnotation processing开启

  • Lombok is enabled in the project项目中启用了Lombok

  • @log support is enabled @log支持已启用

  • Tried adding missing lombok dependency warning, didn't work尝试添加缺少的 lombok 依赖警告,没有用

  • In lombok.config : lombok.log.fieldName=LOGGERlombok.configlombok.log.fieldName=LOGGER

I have tried making another project from scratch and the issue persists:我尝试从头开始制作另一个项目,但问题仍然存在: https://imgur.com/a/zBamc4T

Upon reading lombok documention on loggers it should be log.info instead of Logger.info , isn't it?在阅读关于记录器的log.info文档时,它应该是log.info而不是Logger.info ,不是吗?

If configuration lombok.log.fieldName=LOGGER is working, it should be LOGGER.info(... .如果配置lombok.log.fieldName=LOGGER正在工作,它应该是LOGGER.info(... .

Did you make sure that your lombok.config file where you define lombok.log.fieldName=LOGGER is at the correct location?您是否确保您定义lombok.log.fieldName=LOGGER lombok.config文件位于正确的位置?

According to https://projectlombok.org/features/configuration :根据https://projectlombok.org/features/configuration

You can create lombok.config files in any directory and put configuration directives in it.您可以在任何目录中创建 lombok.config 文件并将配置指令放入其中。 These apply to all source files in this directory and all child directories.这些适用于此目录和所有子目录中的所有源文件。

确保您已在pom.xml或 gradle 中添加了 Log4j 或 Logback 依赖项

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM