• <legend id='bxddv'><style id='bxddv'><dir id='bxddv'><q id='bxddv'></q></dir></style></legend>

    <i id='bxddv'><tr id='bxddv'><dt id='bxddv'><q id='bxddv'><span id='bxddv'><b id='bxddv'><form id='bxddv'><ins id='bxddv'></ins><ul id='bxddv'></ul><sub id='bxddv'></sub></form><legend id='bxddv'></legend><bdo id='bxddv'><pre id='bxddv'><center id='bxddv'></center></pre></bdo></b><th id='bxddv'></th></span></q></dt></tr></i><div id='bxddv'><tfoot id='bxddv'></tfoot><dl id='bxddv'><fieldset id='bxddv'></fieldset></dl></div>
    <tfoot id='bxddv'></tfoot>

  • <small id='bxddv'></small><noframes id='bxddv'>

      <bdo id='bxddv'></bdo><ul id='bxddv'></ul>

      1. Slf4j LoggerFactory.getLogger 和 sonarqube

        Slf4j LoggerFactory.getLogger and sonarqube(Slf4j LoggerFactory.getLogger 和 sonarqube)

              <legend id='cp1AF'><style id='cp1AF'><dir id='cp1AF'><q id='cp1AF'></q></dir></style></legend>
                • <bdo id='cp1AF'></bdo><ul id='cp1AF'></ul>
                • <i id='cp1AF'><tr id='cp1AF'><dt id='cp1AF'><q id='cp1AF'><span id='cp1AF'><b id='cp1AF'><form id='cp1AF'><ins id='cp1AF'></ins><ul id='cp1AF'></ul><sub id='cp1AF'></sub></form><legend id='cp1AF'></legend><bdo id='cp1AF'><pre id='cp1AF'><center id='cp1AF'></center></pre></bdo></b><th id='cp1AF'></th></span></q></dt></tr></i><div id='cp1AF'><tfoot id='cp1AF'></tfoot><dl id='cp1AF'><fieldset id='cp1AF'></fieldset></dl></div>
                  <tfoot id='cp1AF'></tfoot>

                  <small id='cp1AF'></small><noframes id='cp1AF'>

                    <tbody id='cp1AF'></tbody>
                  本文介绍了Slf4j LoggerFactory.getLogger 和 sonarqube的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  初始化Slf4j LoggerFactory.getLogger的正确方法是什么?我的代码中有

                  What is the correct way to initialize Slf4j LoggerFactory.getLogger? I have in my code

                  static final Logger logger = LoggerFactory.getLogger(MyClass.class);
                  

                  但 sonarqube 代码分析将此代码标记为重大错误:"重命名此常量名称以匹配正则表达式'^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'"

                  But sonarqube code analysis marks this code as major error: "Rename this constant name to match the regular expression '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'"

                  怎么了?

                  推荐答案

                  常量(静态final)变量在Java中一般都是大写的.所以你可以:

                  Constants (static final) variables are generally in upper case in Java. So you can either:

                  • 在这种特殊情况下忽略注释(在记录器中使用小型大写字母并不罕见)
                  • logger 重命名为其他名称,例如 LOG
                  • ignore the comment in this particular case (it is not unusual to use small caps for the logger)
                  • rename logger into something else, for example LOG

                  这篇关于Slf4j LoggerFactory.getLogger 和 sonarqube的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)
                  • <bdo id='cEyEH'></bdo><ul id='cEyEH'></ul>
                    1. <tfoot id='cEyEH'></tfoot>

                            <tbody id='cEyEH'></tbody>

                          <small id='cEyEH'></small><noframes id='cEyEH'>

                          • <i id='cEyEH'><tr id='cEyEH'><dt id='cEyEH'><q id='cEyEH'><span id='cEyEH'><b id='cEyEH'><form id='cEyEH'><ins id='cEyEH'></ins><ul id='cEyEH'></ul><sub id='cEyEH'></sub></form><legend id='cEyEH'></legend><bdo id='cEyEH'><pre id='cEyEH'><center id='cEyEH'></center></pre></bdo></b><th id='cEyEH'></th></span></q></dt></tr></i><div id='cEyEH'><tfoot id='cEyEH'></tfoot><dl id='cEyEH'><fieldset id='cEyEH'></fieldset></dl></div>

                          • <legend id='cEyEH'><style id='cEyEH'><dir id='cEyEH'><q id='cEyEH'></q></dir></style></legend>