logging-retrofit

A Retrofit CallAdapter.Factory for transparent logging.

Лицензия

Лицензия

Категории

Категории

Retrofit Сеть HTTP Clients Logging Библиотеки уровня приложения
Группа

Группа

com.nightlynexus.logging-retrofit
Идентификатор

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

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

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

0.10.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

logging-retrofit
A Retrofit CallAdapter.Factory for transparent logging.
Ссылка на сайт

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

https://github.com/NightlyNexus/logging-retrofit
Система контроля версий

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

https://github.com/NightlyNexus/logging-retrofit

Скачать logging

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

<!-- https://jarcasting.com/artifacts/com.nightlynexus.logging-retrofit/logging/ -->
<dependency>
    <groupId>com.nightlynexus.logging-retrofit</groupId>
    <artifactId>logging</artifactId>
    <version>0.10.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.nightlynexus.logging-retrofit/logging/
implementation 'com.nightlynexus.logging-retrofit:logging:0.10.0'
// https://jarcasting.com/artifacts/com.nightlynexus.logging-retrofit/logging/
implementation ("com.nightlynexus.logging-retrofit:logging:0.10.0")
'com.nightlynexus.logging-retrofit:logging:jar:0.10.0'
<dependency org="com.nightlynexus.logging-retrofit" name="logging" rev="0.10.0">
  <artifact name="logging" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.nightlynexus.logging-retrofit', module='logging', version='0.10.0')
)
libraryDependencies += "com.nightlynexus.logging-retrofit" % "logging" % "0.10.0"
[com.nightlynexus.logging-retrofit/logging "0.10.0"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
com.squareup.okhttp3 : okhttp jar 3.12.0
com.squareup.okio : okio jar 1.16.0
com.squareup.retrofit2 : retrofit jar 2.5.0

test (3)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
com.squareup.okhttp3 : mockwebserver jar 3.12.0
com.google.truth : truth jar 0.42

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

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

Logging-Retrofit

A Retrofit CallAdapter.Factory for transparent logging.

Download

Download the latest JAR or grab via Maven:

<dependency>
  <groupId>com.nightlynexus.logging-retrofit</groupId>
  <artifactId>logging</artifactId>
  <version>0.10.0</version>
</dependency>

or Gradle:

implementation 'com.nightlynexus.logging-retrofit:logging:0.10.0'

TODO: Snapshots of the development version are available in Sonatype's snapshots repository.

Usage

LoggingCallAdapterFactory.Logger logger = new LoggingCallAdapterFactory.Logger() {
  @Override public <T> void onResponse(Call<T> call, Response<T> response) {
    // Implement.
  }

  @Override public <T> void onFailure(Call<T> call, Throwable t) {
    // Implement.
  }
};
Retrofit retrofit = new Retrofit.Builder()
    // Add the LoggingCallAdapterFactory before other CallAdapters factories
    // to let it delegate and log all types of calls.
    .addCallAdapterFactory(new LoggingCallAdapterFactory(logger))
    ...
    .build();

License

Copyright 2017 Eric Cochran

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

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

Версия
0.10.0
0.9.0