From 14f9fb6b1a05e3dbce97574b1e8e9e05edf17729 Mon Sep 17 00:00:00 2001 From: Vitalij Berdinskih Date: Mon, 19 Feb 2024 00:36:49 +0200 Subject: [PATCH] New package. Add Dependabot, Codacy and Sonatype. Update README. * Add Dependabot, Codacy and Sonatype. Update README. * Move to new package io.github.vitalijr2 --- .github/dependabot.yml | 21 ++++++ .github/workflows/codacy.yml | 73 +++++++++++++++++++ .github/workflows/sonatype.yml | 29 ++++++++ .../aws/lambda}/slf4j/AWSLambdaLogger.java | 2 +- .../slf4j/AWSLambdaLoggerConfiguration.java | 2 +- .../AWSLambdaLoggerConfigurationProperty.java | 17 ++++- .../lambda}/slf4j/AWSLambdaLoggerFactory.java | 2 +- .../lambda}/slf4j/AWSLambdaLoggerLevel.java | 2 +- .../lambda}/slf4j/AWSLambdaLoggerOutput.java | 2 +- .../slf4j/AWSLambdaServiceProvider.java | 2 +- .../aws/lambda}/slf4j/package-info.java | 2 +- .../org.slf4j.spi.SLF4JServiceProvider | 2 +- .../AWSLambdaLoggerConfigurationTest.java | 2 +- .../slf4j/AWSLambdaLoggerFactoryTest.java | 2 +- .../slf4j/AWSLambdaLoggerLevelTest.java | 4 +- .../lambda}/slf4j/AWSLambdaLoggerTest.java | 2 +- .../slf4j/AWSLambdaServiceProviderTest.java | 2 +- .../slf4j/EnvironmentVariablesTest.java | 2 +- .../aws/lambda}/slf4j/MarkedTest.java | 2 +- .../aws/lambda}/slf4j/PropertiesTest.java | 2 +- .../java/org/example/ServiceProvider.java | 2 +- .../java/org/example/TestServiceProvider.java | 2 +- .../slf4j/logger}/JSONLoggerOutput.java | 6 +- .../lambda/slf4j/logger}/package-info.java | 2 +- ...jr2.aws.lambda.slf4j.AWSLambdaLoggerOutput | 1 + ..._by.aws_lambda.slf4j.AWSLambdaLoggerOutput | 1 - .../slf4j/logger}/JSONLoggerOutputTest.java | 4 +- .../slf4j/logger}/LambdaLoggerOutput.java | 6 +- .../lambda/slf4j/logger}/package-info.java | 0 ...jr2.aws.lambda.slf4j.AWSLambdaLoggerOutput | 1 + ..._by.aws_lambda.slf4j.AWSLambdaLoggerOutput | 1 - .../slf4j/logger}/LambdaLoggerOutputTest.java | 4 +- readme.md | 4 +- 33 files changed, 173 insertions(+), 35 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/codacy.yml create mode 100644 .github/workflows/sonatype.yml rename core/src/main/java/{uk/bot_by/aws_lambda => io/github/vitalijr2/aws/lambda}/slf4j/AWSLambdaLogger.java (99%) rename core/src/main/java/{uk/bot_by/aws_lambda => io/github/vitalijr2/aws/lambda}/slf4j/AWSLambdaLoggerConfiguration.java (99%) rename core/src/main/java/{uk/bot_by/aws_lambda => io/github/vitalijr2/aws/lambda}/slf4j/AWSLambdaLoggerConfigurationProperty.java (86%) rename core/src/main/java/{uk/bot_by/aws_lambda => io/github/vitalijr2/aws/lambda}/slf4j/AWSLambdaLoggerFactory.java (99%) rename core/src/main/java/{uk/bot_by/aws_lambda => io/github/vitalijr2/aws/lambda}/slf4j/AWSLambdaLoggerLevel.java (97%) rename core/src/main/java/{uk/bot_by/aws_lambda => io/github/vitalijr2/aws/lambda}/slf4j/AWSLambdaLoggerOutput.java (96%) rename core/src/main/java/{uk/bot_by/aws_lambda => io/github/vitalijr2/aws/lambda}/slf4j/AWSLambdaServiceProvider.java (97%) rename core/src/main/java/{uk/bot_by/aws_lambda => io/github/vitalijr2/aws/lambda}/slf4j/package-info.java (79%) rename core/src/test/java/{uk/bot_by/aws_lambda => io/github/vitalijr2/aws/lambda}/slf4j/AWSLambdaLoggerConfigurationTest.java (99%) rename core/src/test/java/{uk/bot_by/aws_lambda => io/github/vitalijr2/aws/lambda}/slf4j/AWSLambdaLoggerFactoryTest.java (95%) rename core/src/test/java/{uk/bot_by/aws_lambda => io/github/vitalijr2/aws/lambda}/slf4j/AWSLambdaLoggerLevelTest.java (95%) rename core/src/test/java/{uk/bot_by/aws_lambda => io/github/vitalijr2/aws/lambda}/slf4j/AWSLambdaLoggerTest.java (99%) rename core/src/test/java/{uk/bot_by/aws_lambda => io/github/vitalijr2/aws/lambda}/slf4j/AWSLambdaServiceProviderTest.java (94%) rename core/src/test/java/{uk/bot_by/aws_lambda => io/github/vitalijr2/aws/lambda}/slf4j/EnvironmentVariablesTest.java (99%) rename core/src/test/java/{uk/bot_by/aws_lambda => io/github/vitalijr2/aws/lambda}/slf4j/MarkedTest.java (99%) rename core/src/test/java/{uk/bot_by/aws_lambda => io/github/vitalijr2/aws/lambda}/slf4j/PropertiesTest.java (99%) rename json-logger/src/main/java/{uk/bot_by/aws_lambda/slf4j/json_output => io/github/vitalijr2/aws/lambda/slf4j/logger}/JSONLoggerOutput.java (96%) rename json-logger/src/main/java/{uk/bot_by/aws_lambda/slf4j/json_output => io/github/vitalijr2/aws/lambda/slf4j/logger}/package-info.java (70%) create mode 100644 json-logger/src/main/resources/META-INF/services/io.github.vitalijr2.aws.lambda.slf4j.AWSLambdaLoggerOutput delete mode 100644 json-logger/src/main/resources/META-INF/services/uk.bot_by.aws_lambda.slf4j.AWSLambdaLoggerOutput rename json-logger/src/test/java/{uk/bot_by/aws_lambda/slf4j/json_output => io/github/vitalijr2/aws/lambda/slf4j/logger}/JSONLoggerOutputTest.java (98%) rename logger/src/main/java/{uk/bot_by/aws_lambda/slf4j/lambda_logger => io/github/vitalijr2/aws/lambda/slf4j/logger}/LambdaLoggerOutput.java (96%) rename logger/src/main/java/{uk/bot_by/aws_lambda/slf4j/lambda_logger => io/github/vitalijr2/aws/lambda/slf4j/logger}/package-info.java (100%) create mode 100644 logger/src/main/resources/META-INF/services/io.github.vitalijr2.aws.lambda.slf4j.AWSLambdaLoggerOutput delete mode 100644 logger/src/main/resources/META-INF/services/uk.bot_by.aws_lambda.slf4j.AWSLambdaLoggerOutput rename logger/src/test/java/{uk/bot_by/aws_lambda/slf4j/lambda_logger => io/github/vitalijr2/aws/lambda/slf4j/logger}/LambdaLoggerOutputTest.java (98%) diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..3a55baa --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,21 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + # Maintain dependencies for Maven + - package-ecosystem: "maven" + directory: "/" + schedule: + interval: "weekly" + day: "sunday" + target-branch: "development" + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + day: "sunday" + target-branch: "development" \ No newline at end of file diff --git a/.github/workflows/codacy.yml b/.github/workflows/codacy.yml new file mode 100644 index 0000000..7250021 --- /dev/null +++ b/.github/workflows/codacy.yml @@ -0,0 +1,73 @@ +name: "Codacy" + +on: + push: + branches: [ "**" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "**" ] + +jobs: + build: + name: Maven build + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Setup Java JDK + uses: actions/setup-java@v4 + with: + distribution: 'corretto' + java-version: 11 + - name: Build with Maven + run: ./mvnw --batch-mode + - name: Temporarily save target and test requests + uses: actions/upload-artifact@master + with: + name: tests-and-target + path: | + core/target + logger/target + json-logger/target + retention-days: 1 + codacy-security-scan: + name: Codacy Security Scan + needs: build + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Run Codacy Analysis CLI + uses: codacy/codacy-analysis-cli-action@5cc54a75f9ad88159bb54046196d920e40e367a5 + with: + project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} + verbose: true + output: results.sarif + format: sarif + gh-code-scanning-compat: true + max-allowed-issues: 2147483647 + - name: Upload SARIF results file + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: results.sarif + codacy-coverage-reporter: + name: Codacy Coverage Reporter + needs: build + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Retrieve saved test requests and target + uses: actions/download-artifact@master + with: + name: tests-and-target + path: . + - name: Run codacy-coverage-reporter + uses: codacy/codacy-coverage-reporter-action@v1 + with: + project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} + coverage-reports: core/target/site/jacoco/jacoco.xml,logger/target/site/jacoco/jacoco.xml,json-logger/target/site/jacoco/jacoco.xml diff --git a/.github/workflows/sonatype.yml b/.github/workflows/sonatype.yml new file mode 100644 index 0000000..007ae3e --- /dev/null +++ b/.github/workflows/sonatype.yml @@ -0,0 +1,29 @@ +name: "Publish artifacts" + +on: + release: + types: [ created ] + +jobs: + publish: + name: Publish to Maven Central + runs-on: ubuntu-latest + timeout-minutes: 15 + permissions: + actions: read + contents: read + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Setup Java JDK + uses: actions/setup-java@v4 + with: + distribution: 'corretto' + java-version: 11 + - name: Build and publish with Maven + env: + SIGN_KEY: ${{ secrets.SIGN_KEY }} + SIGN_KEY_PASS: ${{ secrets.SIGN_KEY_PASS }} + SONATYPE_TOKEN_USERNAME: ${{ secrets.SONATYPE_TOKEN_USERNAME }} + SONATYPE_TOKEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN_PASSWORD }} + run: ./mvnw --batch-mode -s .mvn/ci_settings.xml -pl core,logger,json-logger,. -am -ntp -DskipTests -Prelease \ No newline at end of file diff --git a/core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLogger.java b/core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLogger.java similarity index 99% rename from core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLogger.java rename to core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLogger.java index ee2213f..f628744 100644 --- a/core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLogger.java +++ b/core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLogger.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package uk.bot_by.aws_lambda.slf4j; +package io.github.vitalijr2.aws.lambda.slf4j; import java.io.ObjectStreamException; import java.io.Serializable; diff --git a/core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerConfiguration.java b/core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerConfiguration.java similarity index 99% rename from core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerConfiguration.java rename to core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerConfiguration.java index c65e150..b0afdad 100644 --- a/core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerConfiguration.java +++ b/core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerConfiguration.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package uk.bot_by.aws_lambda.slf4j; +package io.github.vitalijr2.aws.lambda.slf4j; import static java.util.Objects.isNull; import static java.util.Objects.nonNull; diff --git a/core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerConfigurationProperty.java b/core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerConfigurationProperty.java similarity index 86% rename from core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerConfigurationProperty.java rename to core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerConfigurationProperty.java index bdb7fd3..ad7bd17 100644 --- a/core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerConfigurationProperty.java +++ b/core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerConfigurationProperty.java @@ -1,4 +1,19 @@ -package uk.bot_by.aws_lambda.slf4j; +/* + * Copyright 2022-2024 Vitalij Berdinskih + * + * 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. + */ +package io.github.vitalijr2.aws.lambda.slf4j; /** * The configuration properties and environment variables. diff --git a/core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerFactory.java b/core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerFactory.java similarity index 99% rename from core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerFactory.java rename to core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerFactory.java index 2d66eba..5deed81 100644 --- a/core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerFactory.java +++ b/core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerFactory.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package uk.bot_by.aws_lambda.slf4j; +package io.github.vitalijr2.aws.lambda.slf4j; import static java.util.Objects.isNull; import static java.util.Objects.nonNull; diff --git a/core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerLevel.java b/core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerLevel.java similarity index 97% rename from core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerLevel.java rename to core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerLevel.java index dcf3104..20c4bfc 100644 --- a/core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerLevel.java +++ b/core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerLevel.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package uk.bot_by.aws_lambda.slf4j; +package io.github.vitalijr2.aws.lambda.slf4j; import static java.util.Objects.requireNonNull; diff --git a/core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerOutput.java b/core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerOutput.java similarity index 96% rename from core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerOutput.java rename to core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerOutput.java index 0a8d7c3..22113b0 100644 --- a/core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerOutput.java +++ b/core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerOutput.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package uk.bot_by.aws_lambda.slf4j; +package io.github.vitalijr2.aws.lambda.slf4j; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaServiceProvider.java b/core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaServiceProvider.java similarity index 97% rename from core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaServiceProvider.java rename to core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaServiceProvider.java index 7fc1252..0858e35 100644 --- a/core/src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaServiceProvider.java +++ b/core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaServiceProvider.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package uk.bot_by.aws_lambda.slf4j; +package io.github.vitalijr2.aws.lambda.slf4j; import org.slf4j.ILoggerFactory; import org.slf4j.IMarkerFactory; diff --git a/core/src/main/java/uk/bot_by/aws_lambda/slf4j/package-info.java b/core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/package-info.java similarity index 79% rename from core/src/main/java/uk/bot_by/aws_lambda/slf4j/package-info.java rename to core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/package-info.java index 8f959c3..ccb5c40 100644 --- a/core/src/main/java/uk/bot_by/aws_lambda/slf4j/package-info.java +++ b/core/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/package-info.java @@ -5,4 +5,4 @@ * @author Vitalij Berdinskih * @since 1.0.0 */ -package uk.bot_by.aws_lambda.slf4j; +package io.github.vitalijr2.aws.lambda.slf4j; diff --git a/core/src/main/resources/META-INF/services/org.slf4j.spi.SLF4JServiceProvider b/core/src/main/resources/META-INF/services/org.slf4j.spi.SLF4JServiceProvider index c8c85b0..fde3360 100644 --- a/core/src/main/resources/META-INF/services/org.slf4j.spi.SLF4JServiceProvider +++ b/core/src/main/resources/META-INF/services/org.slf4j.spi.SLF4JServiceProvider @@ -1 +1 @@ -uk.bot_by.aws_lambda.slf4j.AWSLambdaServiceProvider +io.github.vitalijr2.aws.lambda.slf4j.AWSLambdaServiceProvider diff --git a/core/src/test/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerConfigurationTest.java b/core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerConfigurationTest.java similarity index 99% rename from core/src/test/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerConfigurationTest.java rename to core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerConfigurationTest.java index 75a3fb9..8ab1e67 100644 --- a/core/src/test/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerConfigurationTest.java +++ b/core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerConfigurationTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.aws_lambda.slf4j; +package io.github.vitalijr2.aws.lambda.slf4j; import static java.util.Objects.nonNull; import static org.junit.jupiter.api.Assertions.assertAll; diff --git a/core/src/test/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerFactoryTest.java b/core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerFactoryTest.java similarity index 95% rename from core/src/test/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerFactoryTest.java rename to core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerFactoryTest.java index de09ce5..5ca02b1 100644 --- a/core/src/test/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerFactoryTest.java +++ b/core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerFactoryTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.aws_lambda.slf4j; +package io.github.vitalijr2.aws.lambda.slf4j; import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/core/src/test/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerLevelTest.java b/core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerLevelTest.java similarity index 95% rename from core/src/test/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerLevelTest.java rename to core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerLevelTest.java index dbd8dfe..529c2fd 100644 --- a/core/src/test/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerLevelTest.java +++ b/core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerLevelTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.aws_lambda.slf4j; +package io.github.vitalijr2.aws.lambda.slf4j; import static java.util.Objects.isNull; import static org.hamcrest.MatcherAssert.assertThat; @@ -8,6 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; +import io.github.vitalijr2.aws.lambda.slf4j.AWSLambdaLoggerLevel.Builder; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -15,7 +16,6 @@ import org.junit.jupiter.params.converter.TypedArgumentConverter; import org.junit.jupiter.params.provider.CsvSource; import org.slf4j.event.Level; -import uk.bot_by.aws_lambda.slf4j.AWSLambdaLoggerLevel.Builder; @Tag("fast") class AWSLambdaLoggerLevelTest { diff --git a/core/src/test/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerTest.java b/core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerTest.java similarity index 99% rename from core/src/test/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerTest.java rename to core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerTest.java index 8d86709..3af10cc 100644 --- a/core/src/test/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaLoggerTest.java +++ b/core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaLoggerTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.aws_lambda.slf4j; +package io.github.vitalijr2.aws.lambda.slf4j; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; diff --git a/core/src/test/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaServiceProviderTest.java b/core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaServiceProviderTest.java similarity index 94% rename from core/src/test/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaServiceProviderTest.java rename to core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaServiceProviderTest.java index 820bf91..2502a8b 100644 --- a/core/src/test/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaServiceProviderTest.java +++ b/core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/AWSLambdaServiceProviderTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.aws_lambda.slf4j; +package io.github.vitalijr2.aws.lambda.slf4j; import static org.junit.jupiter.api.Assertions.assertAll; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/core/src/test/java/uk/bot_by/aws_lambda/slf4j/EnvironmentVariablesTest.java b/core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/EnvironmentVariablesTest.java similarity index 99% rename from core/src/test/java/uk/bot_by/aws_lambda/slf4j/EnvironmentVariablesTest.java rename to core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/EnvironmentVariablesTest.java index 6f8eeb9..91d82ca 100644 --- a/core/src/test/java/uk/bot_by/aws_lambda/slf4j/EnvironmentVariablesTest.java +++ b/core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/EnvironmentVariablesTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.aws_lambda.slf4j; +package io.github.vitalijr2.aws.lambda.slf4j; import static java.util.Objects.nonNull; import static org.junit.jupiter.api.Assertions.assertAll; diff --git a/core/src/test/java/uk/bot_by/aws_lambda/slf4j/MarkedTest.java b/core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/MarkedTest.java similarity index 99% rename from core/src/test/java/uk/bot_by/aws_lambda/slf4j/MarkedTest.java rename to core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/MarkedTest.java index c2ebd01..d5c1688 100644 --- a/core/src/test/java/uk/bot_by/aws_lambda/slf4j/MarkedTest.java +++ b/core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/MarkedTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.aws_lambda.slf4j; +package io.github.vitalijr2.aws.lambda.slf4j; import static java.util.Objects.nonNull; import static org.junit.jupiter.api.Assertions.assertAll; diff --git a/core/src/test/java/uk/bot_by/aws_lambda/slf4j/PropertiesTest.java b/core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/PropertiesTest.java similarity index 99% rename from core/src/test/java/uk/bot_by/aws_lambda/slf4j/PropertiesTest.java rename to core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/PropertiesTest.java index 83ce0a8..05d6b77 100644 --- a/core/src/test/java/uk/bot_by/aws_lambda/slf4j/PropertiesTest.java +++ b/core/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/PropertiesTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.aws_lambda.slf4j; +package io.github.vitalijr2.aws.lambda.slf4j; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.Is.is; diff --git a/core/src/test/java/org/example/ServiceProvider.java b/core/src/test/java/org/example/ServiceProvider.java index 8ee0fb6..9ce7c7c 100644 --- a/core/src/test/java/org/example/ServiceProvider.java +++ b/core/src/test/java/org/example/ServiceProvider.java @@ -1,6 +1,6 @@ package org.example; -import uk.bot_by.aws_lambda.slf4j.AWSLambdaLoggerOutput; +import io.github.vitalijr2.aws.lambda.slf4j.AWSLambdaLoggerOutput; public interface ServiceProvider extends AWSLambdaLoggerOutput { diff --git a/core/src/test/java/org/example/TestServiceProvider.java b/core/src/test/java/org/example/TestServiceProvider.java index 2bd2eff..a8c454b 100644 --- a/core/src/test/java/org/example/TestServiceProvider.java +++ b/core/src/test/java/org/example/TestServiceProvider.java @@ -1,10 +1,10 @@ package org.example; +import io.github.vitalijr2.aws.lambda.slf4j.AWSLambdaLoggerConfiguration; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.slf4j.Marker; import org.slf4j.event.Level; -import uk.bot_by.aws_lambda.slf4j.AWSLambdaLoggerConfiguration; public class TestServiceProvider implements ServiceProvider { diff --git a/json-logger/src/main/java/uk/bot_by/aws_lambda/slf4j/json_output/JSONLoggerOutput.java b/json-logger/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/logger/JSONLoggerOutput.java similarity index 96% rename from json-logger/src/main/java/uk/bot_by/aws_lambda/slf4j/json_output/JSONLoggerOutput.java rename to json-logger/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/logger/JSONLoggerOutput.java index e02d4e6..440b746 100644 --- a/json-logger/src/main/java/uk/bot_by/aws_lambda/slf4j/json_output/JSONLoggerOutput.java +++ b/json-logger/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/logger/JSONLoggerOutput.java @@ -13,12 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package uk.bot_by.aws_lambda.slf4j.json_output; +package io.github.vitalijr2.aws.lambda.slf4j.logger; import static java.util.Objects.nonNull; import com.amazonaws.services.lambda.runtime.LambdaLogger; import com.amazonaws.services.lambda.runtime.LambdaRuntime; +import io.github.vitalijr2.aws.lambda.slf4j.AWSLambdaLoggerConfiguration; +import io.github.vitalijr2.aws.lambda.slf4j.AWSLambdaLoggerOutput; import java.io.ByteArrayOutputStream; import java.io.PrintStream; import java.text.DateFormat; @@ -31,8 +33,6 @@ import org.slf4j.MDC; import org.slf4j.Marker; import org.slf4j.event.Level; -import uk.bot_by.aws_lambda.slf4j.AWSLambdaLoggerConfiguration; -import uk.bot_by.aws_lambda.slf4j.AWSLambdaLoggerOutput; /** * An SLF4J Logger implementation for AWS Lambda with JSON output. diff --git a/json-logger/src/main/java/uk/bot_by/aws_lambda/slf4j/json_output/package-info.java b/json-logger/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/logger/package-info.java similarity index 70% rename from json-logger/src/main/java/uk/bot_by/aws_lambda/slf4j/json_output/package-info.java rename to json-logger/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/logger/package-info.java index c6a55c4..54fa8f4 100644 --- a/json-logger/src/main/java/uk/bot_by/aws_lambda/slf4j/json_output/package-info.java +++ b/json-logger/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/logger/package-info.java @@ -4,4 +4,4 @@ * @author Vitalij Berdinskih * @since 1.0.0 */ -package uk.bot_by.aws_lambda.slf4j.json_output; +package io.github.vitalijr2.aws.lambda.slf4j.logger; diff --git a/json-logger/src/main/resources/META-INF/services/io.github.vitalijr2.aws.lambda.slf4j.AWSLambdaLoggerOutput b/json-logger/src/main/resources/META-INF/services/io.github.vitalijr2.aws.lambda.slf4j.AWSLambdaLoggerOutput new file mode 100644 index 0000000..0cde75b --- /dev/null +++ b/json-logger/src/main/resources/META-INF/services/io.github.vitalijr2.aws.lambda.slf4j.AWSLambdaLoggerOutput @@ -0,0 +1 @@ +io.github.vitalijr2.aws.lambda.slf4j.logger.JSONLoggerOutput \ No newline at end of file diff --git a/json-logger/src/main/resources/META-INF/services/uk.bot_by.aws_lambda.slf4j.AWSLambdaLoggerOutput b/json-logger/src/main/resources/META-INF/services/uk.bot_by.aws_lambda.slf4j.AWSLambdaLoggerOutput deleted file mode 100644 index e4a1293..0000000 --- a/json-logger/src/main/resources/META-INF/services/uk.bot_by.aws_lambda.slf4j.AWSLambdaLoggerOutput +++ /dev/null @@ -1 +0,0 @@ -uk.bot_by.aws_lambda.slf4j.json_output.JSONLoggerOutput \ No newline at end of file diff --git a/json-logger/src/test/java/uk/bot_by/aws_lambda/slf4j/json_output/JSONLoggerOutputTest.java b/json-logger/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/logger/JSONLoggerOutputTest.java similarity index 98% rename from json-logger/src/test/java/uk/bot_by/aws_lambda/slf4j/json_output/JSONLoggerOutputTest.java rename to json-logger/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/logger/JSONLoggerOutputTest.java index f43f371..d8b500e 100644 --- a/json-logger/src/test/java/uk/bot_by/aws_lambda/slf4j/json_output/JSONLoggerOutputTest.java +++ b/json-logger/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/logger/JSONLoggerOutputTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.aws_lambda.slf4j.json_output; +package io.github.vitalijr2.aws.lambda.slf4j.logger; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.IsEqual.equalTo; @@ -19,6 +19,7 @@ import static org.skyscreamer.jsonassert.JSONAssert.assertEquals; import com.amazonaws.services.lambda.runtime.LambdaLogger; +import io.github.vitalijr2.aws.lambda.slf4j.AWSLambdaLoggerConfiguration; import java.io.PrintStream; import java.text.DateFormat; import java.text.FieldPosition; @@ -38,7 +39,6 @@ import org.slf4j.Marker; import org.slf4j.event.Level; import org.slf4j.helpers.BasicMarkerFactory; -import uk.bot_by.aws_lambda.slf4j.AWSLambdaLoggerConfiguration; @ExtendWith(MockitoExtension.class) @Tag("fast") diff --git a/logger/src/main/java/uk/bot_by/aws_lambda/slf4j/lambda_logger/LambdaLoggerOutput.java b/logger/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/logger/LambdaLoggerOutput.java similarity index 96% rename from logger/src/main/java/uk/bot_by/aws_lambda/slf4j/lambda_logger/LambdaLoggerOutput.java rename to logger/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/logger/LambdaLoggerOutput.java index 9a0bff4..08bdc63 100644 --- a/logger/src/main/java/uk/bot_by/aws_lambda/slf4j/lambda_logger/LambdaLoggerOutput.java +++ b/logger/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/logger/LambdaLoggerOutput.java @@ -13,12 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package uk.bot_by.aws_lambda.slf4j.lambda_logger; +package io.github.vitalijr2.aws.lambda.slf4j.logger; import static java.util.Objects.nonNull; import com.amazonaws.services.lambda.runtime.LambdaLogger; import com.amazonaws.services.lambda.runtime.LambdaRuntime; +import io.github.vitalijr2.aws.lambda.slf4j.AWSLambdaLoggerConfiguration; +import io.github.vitalijr2.aws.lambda.slf4j.AWSLambdaLoggerOutput; import java.io.ByteArrayOutputStream; import java.io.PrintStream; import java.text.DateFormat; @@ -29,8 +31,6 @@ import org.slf4j.MDC; import org.slf4j.Marker; import org.slf4j.event.Level; -import uk.bot_by.aws_lambda.slf4j.AWSLambdaLoggerConfiguration; -import uk.bot_by.aws_lambda.slf4j.AWSLambdaLoggerOutput; /** * An SLF4J Logger implementation for AWS Lambda. diff --git a/logger/src/main/java/uk/bot_by/aws_lambda/slf4j/lambda_logger/package-info.java b/logger/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/logger/package-info.java similarity index 100% rename from logger/src/main/java/uk/bot_by/aws_lambda/slf4j/lambda_logger/package-info.java rename to logger/src/main/java/io/github/vitalijr2/aws/lambda/slf4j/logger/package-info.java diff --git a/logger/src/main/resources/META-INF/services/io.github.vitalijr2.aws.lambda.slf4j.AWSLambdaLoggerOutput b/logger/src/main/resources/META-INF/services/io.github.vitalijr2.aws.lambda.slf4j.AWSLambdaLoggerOutput new file mode 100644 index 0000000..7cea5b7 --- /dev/null +++ b/logger/src/main/resources/META-INF/services/io.github.vitalijr2.aws.lambda.slf4j.AWSLambdaLoggerOutput @@ -0,0 +1 @@ +io.github.vitalijr2.aws.lambda.slf4j.logger.LambdaLoggerOutput \ No newline at end of file diff --git a/logger/src/main/resources/META-INF/services/uk.bot_by.aws_lambda.slf4j.AWSLambdaLoggerOutput b/logger/src/main/resources/META-INF/services/uk.bot_by.aws_lambda.slf4j.AWSLambdaLoggerOutput deleted file mode 100644 index 3ecb1df..0000000 --- a/logger/src/main/resources/META-INF/services/uk.bot_by.aws_lambda.slf4j.AWSLambdaLoggerOutput +++ /dev/null @@ -1 +0,0 @@ -uk.bot_by.aws_lambda.slf4j.lambda_logger.LambdaLoggerOutput \ No newline at end of file diff --git a/logger/src/test/java/uk/bot_by/aws_lambda/slf4j/lambda_logger/LambdaLoggerOutputTest.java b/logger/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/logger/LambdaLoggerOutputTest.java similarity index 98% rename from logger/src/test/java/uk/bot_by/aws_lambda/slf4j/lambda_logger/LambdaLoggerOutputTest.java rename to logger/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/logger/LambdaLoggerOutputTest.java index 49571d5..1ac6800 100644 --- a/logger/src/test/java/uk/bot_by/aws_lambda/slf4j/lambda_logger/LambdaLoggerOutputTest.java +++ b/logger/src/test/java/io/github/vitalijr2/aws/lambda/slf4j/logger/LambdaLoggerOutputTest.java @@ -1,4 +1,4 @@ -package uk.bot_by.aws_lambda.slf4j.lambda_logger; +package io.github.vitalijr2.aws.lambda.slf4j.logger; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.StringStartsWith.startsWith; @@ -16,6 +16,7 @@ import static org.mockito.Mockito.when; import com.amazonaws.services.lambda.runtime.LambdaLogger; +import io.github.vitalijr2.aws.lambda.slf4j.AWSLambdaLoggerConfiguration; import java.io.PrintStream; import java.text.DateFormat; import java.text.FieldPosition; @@ -34,7 +35,6 @@ import org.slf4j.Marker; import org.slf4j.event.Level; import org.slf4j.helpers.BasicMarkerFactory; -import uk.bot_by.aws_lambda.slf4j.AWSLambdaLoggerConfiguration; @ExtendWith(MockitoExtension.class) @Tag("fast") diff --git a/readme.md b/readme.md index 81f53bd..047e82d 100644 --- a/readme.md +++ b/readme.md @@ -3,8 +3,8 @@ An [SLF4J][] Logger implementation for [AWS Lambda][lambda] and [CloudWatch][cloudwatch]. -[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ce44f4e6dfca46a893d1986b4747feca)](https://app.codacy.com/gh/vitalijr2/aws-lambda-slf4j/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) -[![Codacy Coverage](https://app.codacy.com/project/badge/Coverage/ce44f4e6dfca46a893d1986b4747feca)](https://app.codacy.com/gh/vitalijr2/aws-lambda-slf4j/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage) +[![Codacy Badge](https://app.codacy.com/project/badge/Grade/2c7cc1b8f6d7491283e13447594fdd82)](https://app.codacy.com/gh/vitalijr2/aws-lambda-slf4j/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) +[![Codacy Coverage](https://app.codacy.com/project/badge/Coverage/2c7cc1b8f6d7491283e13447594fdd82)](https://app.codacy.com/gh/vitalijr2/aws-lambda-slf4j/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage) [![Java Version](https://img.shields.io/static/v1?label=java&message=11&color=blue&logo=java&logoColor=E23D28)](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html) | Logger | Release | Javadoc |