https://bz.apache.org/bugzilla/show_bug.cgi?id=63249

            Bug ID: 63249
           Summary: Inconsistent log level practices
           Product: Tomcat 9
           Version: 9.0.16
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: anu...@163.com
  Target Milestone: -----

There are inconsistent log level practices in similiar situations.
(1)file
path:apache-tomcat-9.0.16-src\java\org\apache\catalina\util\LifecycleMBeanBase.java
//log level:warn
        try {
            on = new ObjectName(name.toString());

            Registry.getRegistry(null, null).registerComponent(obj, on, null);
        } catch (MalformedObjectNameException e) {
            log.warn(sm.getString("lifecycleMBeanBase.registerFail", obj,
name),
                    e);
        } catch (Exception e) {
            log.warn(sm.getString("lifecycleMBeanBase.registerFail", obj,
name),
                    e);
        }
(2)file
path:apache-tomcat-9.0.16-src\java\org\apache\catalina\core\ApplicationFilterConfig.java
//log level:info
        try {
            oname = new ObjectName(onameStr);
            Registry.getRegistry(null, null).registerComponent(this, oname,
                    null);
        } catch (Exception ex) {
            log.info(sm.getString("applicationFilterConfig.jmxRegisterFail",
                    getFilterClass(), getFilterName()), ex);
        }
(3)file
path:apache-tomcat-9.0.16-src\java\org\apache\catalina\core\StandardWrapper.java
//log level:info
            try {
                jspMonitorON = new ObjectName(oname.toString());
                Registry.getRegistry(null, null)
                    .registerComponent(instance, jspMonitorON, null);
            } catch (Exception ex) {
                log.info(sm.getString("standardWrapper.jspMonitorError",
instance));
            }

I think the log level should be consistent in above contexts, so the log level
of first example more likely to be assigned INFO.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to