Class GuiceStatsTracker

java.lang.Object
ru.vyarus.dropwizard.guice.module.context.stat.GuiceStatsTracker

public class GuiceStatsTracker extends Object
Guice logs internal stats with java util logger (ContinuousStopwatch). In order to intercept these messages, append custom handler to this logger, but just for injector creation time.
  • Constructor Details

    • GuiceStatsTracker

      public GuiceStatsTracker()
  • Method Details

    • injectLogsInterceptor

      public void injectLogsInterceptor()
      Cut off guice logger from parent handlers and add individual handler to intercept log messages.
    • resetStatsLogger

      public void resetStatsLogger()
      After injector creation reset logger back to parent handler.
    • getMessages

      public List<String> getMessages()
      Returns:
      guice injector creation stat messages with non zero time