AWS request handler for logging call details.

This is a library that can be used to various details about an AWS call in a log file

Лицензия

Лицензия

Категории

Категории

AWS Контейнер PaaS Providers
Группа

Группа

cloud.cirrusup
Идентификатор

Идентификатор

aws-latency-request-log-handler
Последняя версия

Последняя версия

1.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

AWS request handler for logging call details.
This is a library that can be used to various details about an AWS call in a log file
Ссылка на сайт

Ссылка на сайт

https://github.com/cirrus-up-cloud/aws-latency-request-log-handler
Система контроля версий

Система контроля версий

http://github.com/cirrus-up-cloud/aws-latency-request-log-handler

Скачать aws-latency-request-log-handler

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/cloud.cirrusup/aws-latency-request-log-handler/ -->
<dependency>
    <groupId>cloud.cirrusup</groupId>
    <artifactId>aws-latency-request-log-handler</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/cloud.cirrusup/aws-latency-request-log-handler/
implementation 'cloud.cirrusup:aws-latency-request-log-handler:1.1.0'
// https://jarcasting.com/artifacts/cloud.cirrusup/aws-latency-request-log-handler/
implementation ("cloud.cirrusup:aws-latency-request-log-handler:1.1.0")
'cloud.cirrusup:aws-latency-request-log-handler:jar:1.1.0'
<dependency org="cloud.cirrusup" name="aws-latency-request-log-handler" rev="1.1.0">
  <artifact name="aws-latency-request-log-handler" type="jar" />
</dependency>
@Grapes(
@Grab(group='cloud.cirrusup', module='aws-latency-request-log-handler', version='1.1.0')
)
libraryDependencies += "cloud.cirrusup" % "aws-latency-request-log-handler" % "1.1.0"
[cloud.cirrusup/aws-latency-request-log-handler "1.1.0"]

Зависимости

compile (7)

Идентификатор библиотеки Тип Версия
com.amazonaws : aws-java-sdk-core jar 1.11.397
com.amazonaws : aws-java-sdk-s3 jar 1.11.397
com.fasterxml.jackson.core : jackson-core jar 2.9.7
org.slf4j : slf4j-api jar 1.7.5
org.slf4j : jcl-over-slf4j jar 1.7.5
junit : junit jar 4.12
org.mockito : mockito-core jar 2.0.5-beta

runtime (1)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-simple jar 1.7.5

test (3)

Идентификатор библиотеки Тип Версия
org.powermock : powermock-api-mockito jar 1.6.2
org.powermock : powermock-module-junit4 jar 1.6.2
org.powermock : powermock-core jar 1.7.0

Модули Проекта

Данный проект не имеет модулей.

Maven Central

AWS Latency request log handler

Description

This library exposes a simple but very efficient AWS request handler that log in a text files various details about your AWS calls.

How to use it

i. Declare the dependency in your pom.xml file.

<dependency>
  <groupId>cloud.cirrusup</groupId>
  <artifactId>aws-latency-request-log-handler</artifactId>
  <version>1.1.0</version>
</dependency>

ii. Create a request handler object.

AwsLatencyRequestLogHandler handler = new AwsLatencyRequestLogHandler();

If you want to publish call details in JSON format, then declare the handler in the following manner:

AwsLatencyRequestLogHandler handler = new AwsLatencyRequestLogHandler(new JSONPublisher());

iii. Enhance the AWS client with the request handler created above.

amazonS3Client.addRequestHandler(handler);    

iv. Create a log appender named aws-latency-log.

  <appender name="AWS-APPENDER-LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>/var/log/awsLatency.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
      <!-- hourly rollover -->
      <fileNamePattern>/var/log/awsLatency/awsLatency.%d{yyyy-MM-dd-HH}.log</fileNamePattern>
      <!-- keep 2 days' worth of history capped at 500MB total size -->
      <maxHistory>2</maxHistory>
      <totalSizeCap>500MB</totalSizeCap>
    </rollingPolicy>
    <encoder>
      <pattern>[%thread] %-5level - %d{yyyy-MM-dd HH:mm:ss} - %logger{36} - %msg%n</pattern>
    </encoder>
  </appender>

  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
      <pattern>[%thread] %-5level - %d{yyyy-MM-dd HH:mm:ss} - %logger{36} - %msg%n</pattern>
    </encoder>
  </appender>

Версии библиотеки

Версия
1.1.0
1.0.0