All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.qsy7.logging.util.RateLimitUtil Maven / Gradle / Ivy

The newest version!
package io.github.qsy7.logging.util;

public class RateLimitUtil {
  //      final LogLevelMap logLevelMap = LogLevelUtil.get(methodDescription);
  //          "Log Level: "
  //              + logLevelMap
  //              + "/"
  //              + methodDescription
  //              + methodDescription.isConstructor());

  //      if (logLevelMap != null) {
  //        builder = builder.visit(Advice.to(new
  // LoggerInstance()/*logLevelMap.getAdviceClass()*/).on(is(methodDescription)));

  //              final boolean isSensitive =
  //
  // methodDescription.getDeclaredAnnotations().isAnnotationPresent(Sensitive.class);
  //        final boolean isRateLimited =
  //            methodDescription.getDeclaredAnnotations().isAnnotationPresent(LogRate.class);
  //        final double logRate;
  //        if (isRateLimited) {
  //          final LogRate logRateAnnotation =
  //              methodDescription.getDeclaredAnnotations().ofType(LogRate.class).load();
  //          logRate = logRateAnnotation.value();
  //        } else {
  //          logRate = -1.0;
  //        }
  //
  //        final LoggerConfiguration loggerConfiguration =
  //            new LoggerConfiguration(
  //                methodDescription, isSensitive, logRate, LogLevel.DEBUG);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy