odpi / egeria

Egeria core
https://egeria-project.org
Apache License 2.0
806 stars 260 forks source link

Egeria UI has debug enabled by default #1498

Closed planetf1 closed 4 years ago

planetf1 commented 5 years ago

When the Egeria UI is launched, debug output is enabled by default it

  egeria git:(h2update2) ui
 ODPi Egeria

       ______                        _                  __  __   ____
      / ____/ ____ _  ___    _____  (_) ____ _         / / / /  /  _/
     / __/   / __ `/ / _ \  / ___/ / / / __ `/        / / / /   / /
    / /___  / /_/ / /  __/ / /    / / / /_/ /        / /_/ /  _/ /
   /_____/  \__, /  \___/ /_/    /_/  \__,_/         \____/  /___/
           /____/

 :: Powered by Spring Boot (v2.1.6.RELEASE) ::

2019-09-06 10:13:48.565  INFO 57955 --- [           main] o.o.o.u.a.EgeriaUIApplication            : Starting EgeriaUIApplication on Nigels-MBP with PID 57955 (/Users/jonesn/IdeaProjects/egeria/open-metadata-implementation/user-interfaces/access-services-user-interface/target/access-services-user-interface-1.1-SNAPSHOT.jar started by jonesn in /Users/jonesn/IdeaProjects/egeria)
2019-09-06 10:13:48.571  INFO 57955 --- [           main] o.o.o.u.a.EgeriaUIApplication            : No active profile set, falling back to default profiles: default
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (jar:file:/Users/jonesn/IdeaProjects/egeria/open-metadata-implementation/user-interfaces/access-services-user-interface/target/access-services-user-interface-1.1-SNAPSHOT.jar!/BOOT-INF/lib/groovy-2.4.15-indy.jar!/) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2019-09-06 10:13:50.892  INFO 57955 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
2019-09-06 10:13:51.096  INFO 57955 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 171ms. Found 3 repository interfaces.
2019-09-06 10:13:52.274  INFO 57955 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$bb84b60a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-09-06 10:13:53.053  INFO 57955 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8443 (https)

Our approach with the server chassis has been to have default logging level set to WARN & rely on AUDIT events to report problems.

The Egeria UI at a minimum should also default to WARN so that it's very clear what is something that needs to be acted on/be concerned about vs a constant stream of messages. This can of course be overriden via spring properties ie by setting LOGGING_LEVEL_ROOT=debug

For example I can do that here the other way around and get:

➜  egeria git:(h2update2) export LOGGING_LEVEL_ROOT=warn
➜  egeria git:(h2update2) ui
 ODPi Egeria

       ______                        _                  __  __   ____
      / ____/ ____ _  ___    _____  (_) ____ _         / / / /  /  _/
     / __/   / __ `/ / _ \  / ___/ / / / __ `/        / / / /   / /
    / /___  / /_/ / /  __/ / /    / / / /_/ /        / /_/ /  _/ /
   /_____/  \__, /  \___/ /_/    /_/  \__,_/         \____/  /___/
           /____/

 :: Powered by Spring Boot (v2.1.6.RELEASE) ::

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (jar:file:/Users/jonesn/IdeaProjects/egeria/open-metadata-implementation/user-interfaces/access-services-user-interface/target/access-services-user-interface-1.1-SNAPSHOT.jar!/BOOT-INF/lib/groovy-2.4.15-indy.jar!/) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
^C%

(The above error relates to Java 11 & is already reported as #1156 )

Further, consideration should be made as to the appropriate way to capture actionable events in the UI - ie use of audit connector etc

bogdan-sava commented 5 years ago

The server-chassis log level is set to OFF. The UI uses no setup for logging which means it takes the default level provided by the Java Util Logging, Log4J2, and Logback. In each case, loggers are pre-configured to use console output with optional file output also available.

What would be the wanted behavior?

planetf1 commented 5 years ago

I would think making the default level to only log WARN and above be more appropriate. That may need us to add logback configuration for the UI code: https://www.baeldung.com/logback open to see what others think.,.... ? @mandy-chessell

planetf1 commented 4 years ago

Closing as I no longer see debug.

planetf1 commented 4 years ago

Re-opening, as we see a lot of INFO noise during startup. Should switch default level to WARN

planetf1 commented 4 years ago

@bogdan-sava As you are currently refining some of our logging, I think it makes sense to send this your way so that I don't impact you.

I do think it would be good to ultimately get to the point where the default log level is WARN or similar, as most normal events should go via the audit log. Whatever is the default it can always be overridden in any case

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.

planetf1 commented 4 years ago

This is still the case when launching the UI process

bogdan-sava commented 4 years ago

I think for the UI at least ERROR level is appropriate

bogdan-sava commented 4 years ago

Spring boot default root level in INFO not DEBUG. Also in desc of this issue there no DEBUG loggings. I can only see INFO and WARNING logs there.

If this is too verbose, ERROR level should be fine.

planetf1 commented 4 years ago

Yes the original debug issue was addresses. In Dec I posted Re-opening, as we see a lot of INFO noise during startup. Should switch default level to WARN

bogdan-sava commented 4 years ago

OK

bogdan-sava commented 4 years ago
 ODPi Egeria

       ______                        _                  __  __   ____
      / ____/ ____ _  ___    _____  (_) ____ _         / / / /  /  _/
     / __/   / __ `/ / _ \  / ___/ / / / __ `/        / / / /   / /
    / /___  / /_/ / /  __/ / /    / / / /_/ /        / /_/ /  _/ /
   /_____/  \__, /  \___/ /_/    /_/  \__,_/         \____/  /___/
           /____/

 :: Powered by Spring Boot (v2.2.6.RELEASE) ::

2020-05-04 17:50:58.928  INFO 2676 --- [           main] o.o.o.u.u.springboot.EgeriaUIPlatform    : Starting EgeriaUIPlatform on LAPTOPCODE with PID 2676 (/Users/no53jv/projects/egeria-b/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/target/classes started by no53jv in /Users/no53jv/projects/egeria-b)
2020-05-04 17:50:58.932  INFO 2676 --- [           main] o.o.o.u.u.springboot.EgeriaUIPlatform    : No active profile set, falling back to default profiles: default
2020-05-04 17:51:04.449  WARN 2676 --- [           main] org.odpi.openmetadata.http.HttpHelper    : Strict SSL is set to false! Invalid certificates will be accepted for connection!
2020-05-04 17:51:05.431  INFO 2676 --- [           main] o.o.o.u.u.springboot.EgeriaUIPlatform    : Started EgeriaUIPlatform in 7.25 seconds (JVM running for 8.048)
bogdan-sava commented 4 years ago

switched root legel to WARN, but put egeria package on INFO including EgeriaUIPlatform. This allows log the PID and 'Started in..' for anyone look at to know that app actually finished initialization. Looks clean to me.