@Test public void testIsEnabled() { FakeLoggerBackend backend = new FakeLoggerBackend(); FluentLogger logger = new FluentLogger(backend); backend.setLevel(INFO); assertThat(logger.atFine().isEnabled()).isFalse(); assertThat(logger.atInfo().isEnabled()).isTrue(); assertThat(logger.at(Level.WARNING).isEnabled()).isTrue(); }
@Override public final boolean isEnabled() { return wasForced() || getLogger().isLoggable(level); }
LogContext implements LoggingApi<API>, LogData { @Override public final boolean isEnabled() { return wasForced() || getLogger().isLoggable(level); } }
LogContext implements LoggingApi<API>, LogData { @Override public final boolean isEnabled() { return wasForced() || getLogger().isLoggable(level); } protected  LogContext(Level level, boolean isForced); protected  LogContext(Level level, boolean isForced, long timestampNanos); }
LogContext implements LoggingApi<API>, LogData { @Override public final boolean isEnabled() { return wasForced() || getLogger().isLoggable(level); } protected  LogContext(Level level, boolean isForced); protected  LogContext(Level level, boolean isForced, long timestampNanos); @Override final Level getLevel(); @Deprecated @Override final long getTimestampMicros(); @Override final long getTimestampNanos(); @Override final String getLoggerName(); @Override final LogSite getLogSite(); @Override final TemplateContext getTemplateContext(); @Override final Object[] getArguments(); @Override final Object getLiteralArgument(); @Override final boolean wasForced(); @Override final Metadata getMetadata(); @Override final API withInjectedLogSite(LogSite logSite); @SuppressWarnings("deprecation") @Override final API withInjectedLogSite(
      String internalClassName,
      String methodName,
      int encodedLineNumber,
      @NullableDecl String sourceFileName); @Override final boolean isEnabled(); @Override final API with(MetadataKey<T> key, @NullableDecl T value); @Override final API with(MetadataKey<Boolean> key); @Override final API withCause(Throwable cause); @Override API withStackTrace(StackSize size); @Override final API every(int n); @Override final API atMostEvery(int n, TimeUnit unit); @Override final void log(); @Override final void log(String msg); @Override final void log(String message, @NullableDecl Object p1); @Override final void log(String message, @NullableDecl Object p1, @NullableDecl Object p2); @Override final void log(
      String message, @NullableDecl Object p1, @NullableDecl Object p2, @NullableDecl Object p3); @Override final void log(
      String message,
      @NullableDecl Object p1,
      @NullableDecl Object p2,
      @NullableDecl Object p3,
      @NullableDecl Object p4); @Override final void log(
      String msg,
      @NullableDecl Object p1,
      @NullableDecl Object p2,
      @NullableDecl Object p3,
      @NullableDecl Object p4,
      @NullableDecl Object p5); @Override final void log(
      String msg,
      @NullableDecl Object p1,
      @NullableDecl Object p2,
      @NullableDecl Object p3,
      @NullableDecl Object p4,
      @NullableDecl Object p5,
      @NullableDecl Object p6); @Override final void log(
      String msg,
      @NullableDecl Object p1,
      @NullableDecl Object p2,
      @NullableDecl Object p3,
      @NullableDecl Object p4,
      @NullableDecl Object p5,
      @NullableDecl Object p6,
      @NullableDecl Object p7); @Override final void log(
      String msg,
      @NullableDecl Object p1,
      @NullableDecl Object p2,
      @NullableDecl Object p3,
      @NullableDecl Object p4,
      @NullableDecl Object p5,
      @NullableDecl Object p6,
      @NullableDecl Object p7,
      @NullableDecl Object p8); @Override final void log(
      String msg,
      @NullableDecl Object p1,
      @NullableDecl Object p2,
      @NullableDecl Object p3,
      @NullableDecl Object p4,
      @NullableDecl Object p5,
      @NullableDecl Object p6,
      @NullableDecl Object p7,
      @NullableDecl Object p8,
      @NullableDecl Object p9); @Override final void log(
      String msg,
      @NullableDecl Object p1,
      @NullableDecl Object p2,
      @NullableDecl Object p3,
      @NullableDecl Object p4,
      @NullableDecl Object p5,
      @NullableDecl Object p6,
      @NullableDecl Object p7,
      @NullableDecl Object p8,
      @NullableDecl Object p9,
      @NullableDecl Object p10); @Override final void log(
      String msg,
      @NullableDecl Object p1,
      @NullableDecl Object p2,
      @NullableDecl Object p3,
      @NullableDecl Object p4,
      @NullableDecl Object p5,
      @NullableDecl Object p6,
      @NullableDecl Object p7,
      @NullableDecl Object p8,
      @NullableDecl Object p9,
      @NullableDecl Object p10,
      Object... rest); @Override final void log(String message, char p1); @Override final void log(String message, byte p1); @Override final void log(String message, short p1); @Override final void log(String message, int p1); @Override final void log(String message, long p1); @Override final void log(String message, @NullableDecl Object p1, boolean p2); @Override final void log(String message, @NullableDecl Object p1, char p2); @Override final void log(String message, @NullableDecl Object p1, byte p2); @Override final void log(String message, @NullableDecl Object p1, short p2); @Override final void log(String message, @NullableDecl Object p1, int p2); @Override final void log(String message, @NullableDecl Object p1, long p2); @Override final void log(String message, @NullableDecl Object p1, float p2); @Override final void log(String message, @NullableDecl Object p1, double p2); @Override final void log(String message, boolean p1, @NullableDecl Object p2); @Override final void log(String message, char p1, @NullableDecl Object p2); @Override final void log(String message, byte p1, @NullableDecl Object p2); @Override final void log(String message, short p1, @NullableDecl Object p2); @Override final void log(String message, int p1, @NullableDecl Object p2); @Override final void log(String message, long p1, @NullableDecl Object p2); @Override final void log(String message, float p1, @NullableDecl Object p2); @Override final void log(String message, double p1, @NullableDecl Object p2); @Override final void log(String message, boolean p1, boolean p2); @Override final void log(String message, char p1, boolean p2); @Override final void log(String message, byte p1, boolean p2); @Override final void log(String message, short p1, boolean p2); @Override final void log(String message, int p1, boolean p2); @Override final void log(String message, long p1, boolean p2); @Override final void log(String message, float p1, boolean p2); @Override final void log(String message, double p1, boolean p2); @Override final void log(String message, boolean p1, char p2); @Override final void log(String message, char p1, char p2); @Override final void log(String message, byte p1, char p2); @Override final void log(String message, short p1, char p2); @Override final void log(String message, int p1, char p2); @Override final void log(String message, long p1, char p2); @Override final void log(String message, float p1, char p2); @Override final void log(String message, double p1, char p2); @Override final void log(String message, boolean p1, byte p2); @Override final void log(String message, char p1, byte p2); @Override final void log(String message, byte p1, byte p2); @Override final void log(String message, short p1, byte p2); @Override final void log(String message, int p1, byte p2); @Override final void log(String message, long p1, byte p2); @Override final void log(String message, float p1, byte p2); @Override final void log(String message, double p1, byte p2); @Override final void log(String message, boolean p1, short p2); @Override final void log(String message, char p1, short p2); @Override final void log(String message, byte p1, short p2); @Override final void log(String message, short p1, short p2); @Override final void log(String message, int p1, short p2); @Override final void log(String message, long p1, short p2); @Override final void log(String message, float p1, short p2); @Override final void log(String message, double p1, short p2); @Override final void log(String message, boolean p1, int p2); @Override final void log(String message, char p1, int p2); @Override final void log(String message, byte p1, int p2); @Override final void log(String message, short p1, int p2); @Override final void log(String message, int p1, int p2); @Override final void log(String message, long p1, int p2); @Override final void log(String message, float p1, int p2); @Override final void log(String message, double p1, int p2); @Override final void log(String message, boolean p1, long p2); @Override final void log(String message, char p1, long p2); @Override final void log(String message, byte p1, long p2); @Override final void log(String message, short p1, long p2); @Override final void log(String message, int p1, long p2); @Override final void log(String message, long p1, long p2); @Override final void log(String message, float p1, long p2); @Override final void log(String message, double p1, long p2); @Override final void log(String message, boolean p1, float p2); @Override final void log(String message, char p1, float p2); @Override final void log(String message, byte p1, float p2); @Override final void log(String message, short p1, float p2); @Override final void log(String message, int p1, float p2); @Override final void log(String message, long p1, float p2); @Override final void log(String message, float p1, float p2); @Override final void log(String message, double p1, float p2); @Override final void log(String message, boolean p1, double p2); @Override final void log(String message, char p1, double p2); @Override final void log(String message, byte p1, double p2); @Override final void log(String message, short p1, double p2); @Override final void log(String message, int p1, double p2); @Override final void log(String message, long p1, double p2); @Override final void log(String message, float p1, double p2); @Override final void log(String message, double p1, double p2); @Override final void logVarargs(String message, @NullableDecl Object[] params); }
LogContext implements LoggingApi<API>, LogData { @Override public final boolean isEnabled() { return wasForced() || getLogger().isLoggable(level); } protected  LogContext(Level level, boolean isForced); protected  LogContext(Level level, boolean isForced, long timestampNanos); @Override final Level getLevel(); @Deprecated @Override final long getTimestampMicros(); @Override final long getTimestampNanos(); @Override final String getLoggerName(); @Override final LogSite getLogSite(); @Override final TemplateContext getTemplateContext(); @Override final Object[] getArguments(); @Override final Object getLiteralArgument(); @Override final boolean wasForced(); @Override final Metadata getMetadata(); @Override final API withInjectedLogSite(LogSite logSite); @SuppressWarnings("deprecation") @Override final API withInjectedLogSite(
      String internalClassName,
      String methodName,
      int encodedLineNumber,
      @NullableDecl String sourceFileName); @Override final boolean isEnabled(); @Override final API with(MetadataKey<T> key, @NullableDecl T value); @Override final API with(MetadataKey<Boolean> key); @Override final API withCause(Throwable cause); @Override API withStackTrace(StackSize size); @Override final API every(int n); @Override final API atMostEvery(int n, TimeUnit unit); @Override final void log(); @Override final void log(String msg); @Override final void log(String message, @NullableDecl Object p1); @Override final void log(String message, @NullableDecl Object p1, @NullableDecl Object p2); @Override final void log(
      String message, @NullableDecl Object p1, @NullableDecl Object p2, @NullableDecl Object p3); @Override final void log(
      String message,
      @NullableDecl Object p1,
      @NullableDecl Object p2,
      @NullableDecl Object p3,
      @NullableDecl Object p4); @Override final void log(
      String msg,
      @NullableDecl Object p1,
      @NullableDecl Object p2,
      @NullableDecl Object p3,
      @NullableDecl Object p4,
      @NullableDecl Object p5); @Override final void log(
      String msg,
      @NullableDecl Object p1,
      @NullableDecl Object p2,
      @NullableDecl Object p3,
      @NullableDecl Object p4,
      @NullableDecl Object p5,
      @NullableDecl Object p6); @Override final void log(
      String msg,
      @NullableDecl Object p1,
      @NullableDecl Object p2,
      @NullableDecl Object p3,
      @NullableDecl Object p4,
      @NullableDecl Object p5,
      @NullableDecl Object p6,
      @NullableDecl Object p7); @Override final void log(
      String msg,
      @NullableDecl Object p1,
      @NullableDecl Object p2,
      @NullableDecl Object p3,
      @NullableDecl Object p4,
      @NullableDecl Object p5,
      @NullableDecl Object p6,
      @NullableDecl Object p7,
      @NullableDecl Object p8); @Override final void log(
      String msg,
      @NullableDecl Object p1,
      @NullableDecl Object p2,
      @NullableDecl Object p3,
      @NullableDecl Object p4,
      @NullableDecl Object p5,
      @NullableDecl Object p6,
      @NullableDecl Object p7,
      @NullableDecl Object p8,
      @NullableDecl Object p9); @Override final void log(
      String msg,
      @NullableDecl Object p1,
      @NullableDecl Object p2,
      @NullableDecl Object p3,
      @NullableDecl Object p4,
      @NullableDecl Object p5,
      @NullableDecl Object p6,
      @NullableDecl Object p7,
      @NullableDecl Object p8,
      @NullableDecl Object p9,
      @NullableDecl Object p10); @Override final void log(
      String msg,
      @NullableDecl Object p1,
      @NullableDecl Object p2,
      @NullableDecl Object p3,
      @NullableDecl Object p4,
      @NullableDecl Object p5,
      @NullableDecl Object p6,
      @NullableDecl Object p7,
      @NullableDecl Object p8,
      @NullableDecl Object p9,
      @NullableDecl Object p10,
      Object... rest); @Override final void log(String message, char p1); @Override final void log(String message, byte p1); @Override final void log(String message, short p1); @Override final void log(String message, int p1); @Override final void log(String message, long p1); @Override final void log(String message, @NullableDecl Object p1, boolean p2); @Override final void log(String message, @NullableDecl Object p1, char p2); @Override final void log(String message, @NullableDecl Object p1, byte p2); @Override final void log(String message, @NullableDecl Object p1, short p2); @Override final void log(String message, @NullableDecl Object p1, int p2); @Override final void log(String message, @NullableDecl Object p1, long p2); @Override final void log(String message, @NullableDecl Object p1, float p2); @Override final void log(String message, @NullableDecl Object p1, double p2); @Override final void log(String message, boolean p1, @NullableDecl Object p2); @Override final void log(String message, char p1, @NullableDecl Object p2); @Override final void log(String message, byte p1, @NullableDecl Object p2); @Override final void log(String message, short p1, @NullableDecl Object p2); @Override final void log(String message, int p1, @NullableDecl Object p2); @Override final void log(String message, long p1, @NullableDecl Object p2); @Override final void log(String message, float p1, @NullableDecl Object p2); @Override final void log(String message, double p1, @NullableDecl Object p2); @Override final void log(String message, boolean p1, boolean p2); @Override final void log(String message, char p1, boolean p2); @Override final void log(String message, byte p1, boolean p2); @Override final void log(String message, short p1, boolean p2); @Override final void log(String message, int p1, boolean p2); @Override final void log(String message, long p1, boolean p2); @Override final void log(String message, float p1, boolean p2); @Override final void log(String message, double p1, boolean p2); @Override final void log(String message, boolean p1, char p2); @Override final void log(String message, char p1, char p2); @Override final void log(String message, byte p1, char p2); @Override final void log(String message, short p1, char p2); @Override final void log(String message, int p1, char p2); @Override final void log(String message, long p1, char p2); @Override final void log(String message, float p1, char p2); @Override final void log(String message, double p1, char p2); @Override final void log(String message, boolean p1, byte p2); @Override final void log(String message, char p1, byte p2); @Override final void log(String message, byte p1, byte p2); @Override final void log(String message, short p1, byte p2); @Override final void log(String message, int p1, byte p2); @Override final void log(String message, long p1, byte p2); @Override final void log(String message, float p1, byte p2); @Override final void log(String message, double p1, byte p2); @Override final void log(String message, boolean p1, short p2); @Override final void log(String message, char p1, short p2); @Override final void log(String message, byte p1, short p2); @Override final void log(String message, short p1, short p2); @Override final void log(String message, int p1, short p2); @Override final void log(String message, long p1, short p2); @Override final void log(String message, float p1, short p2); @Override final void log(String message, double p1, short p2); @Override final void log(String message, boolean p1, int p2); @Override final void log(String message, char p1, int p2); @Override final void log(String message, byte p1, int p2); @Override final void log(String message, short p1, int p2); @Override final void log(String message, int p1, int p2); @Override final void log(String message, long p1, int p2); @Override final void log(String message, float p1, int p2); @Override final void log(String message, double p1, int p2); @Override final void log(String message, boolean p1, long p2); @Override final void log(String message, char p1, long p2); @Override final void log(String message, byte p1, long p2); @Override final void log(String message, short p1, long p2); @Override final void log(String message, int p1, long p2); @Override final void log(String message, long p1, long p2); @Override final void log(String message, float p1, long p2); @Override final void log(String message, double p1, long p2); @Override final void log(String message, boolean p1, float p2); @Override final void log(String message, char p1, float p2); @Override final void log(String message, byte p1, float p2); @Override final void log(String message, short p1, float p2); @Override final void log(String message, int p1, float p2); @Override final void log(String message, long p1, float p2); @Override final void log(String message, float p1, float p2); @Override final void log(String message, double p1, float p2); @Override final void log(String message, boolean p1, double p2); @Override final void log(String message, char p1, double p2); @Override final void log(String message, byte p1, double p2); @Override final void log(String message, short p1, double p2); @Override final void log(String message, int p1, double p2); @Override final void log(String message, long p1, double p2); @Override final void log(String message, float p1, double p2); @Override final void log(String message, double p1, double p2); @Override final void logVarargs(String message, @NullableDecl Object[] params);  }