Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Commit e66d843

Browse files
committed
Merge branch 'slf4j-2' into 'main'
SLF4J 2 Closes #12 and #13 See merge request bot-by/slf4j-aws-lambda!11
2 parents fe696c4 + 56e167d commit e66d843

File tree

6 files changed

+51
-5
lines changed

6 files changed

+51
-5
lines changed

changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## 2.1.1 - 2022-08-14
7+
## 3.0.0 - 2022-08-21
8+
- **Add a module**
89
- Update dependencies
910
- Update documentation
1011

pom.xml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666

6767
<properties>
6868
<!-- version -->
69-
<revision>2.1.2</revision>
69+
<revision>3.0.0</revision>
7070
<changelist>-SNAPSHOT</changelist>
7171
<sha1/>
7272
<!-- java and maven -->
@@ -100,7 +100,7 @@
100100
<commons-text.version>1.9</commons-text.version>
101101
<!-- dependencies -->
102102
<jetbrains-annotations.version>23.0.0</jetbrains-annotations.version>
103-
<slf4j.version>2.0.0-beta1</slf4j.version>
103+
<slf4j.version>2.0.0</slf4j.version>
104104
</properties>
105105

106106
<dependencies>
@@ -256,6 +256,15 @@
256256
<groupId>org.apache.maven.plugins</groupId>
257257
<artifactId>maven-jar-plugin</artifactId>
258258
<version>${jar-plugin.version}</version>
259+
<configuration>
260+
<archive>
261+
<manifestEntries>
262+
<Automatic-Module-Name>org.slf4j.aws_lambda</Automatic-Module-Name>
263+
<Add-Exports>uk.bot_by.aws_lambda.slf4j</Add-Exports>
264+
<Add-Exports>org.slf4j.impl</Add-Exports>
265+
</manifestEntries>
266+
</archive>
267+
</configuration>
259268
</plugin>
260269
<plugin>
261270
<groupId>org.apache.maven.plugins</groupId>

readme.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ END RequestId: cc4eb5aa-66b4-42fc-b27a-138bd672b38a
4343
```
4444

4545
The footprint of **slf4j-aws-lambda** (68K) is same size as **slf4j-simple** (64K) and much smaller
46-
than **logback** (716K).
46+
than **logback** (716K). Other AWS centric loggers are [SLF4J/Logback Appender][awslambda-logback],
47+
Logback's [CloudWatch appender][cloudwatch-appender] and [CloudWatchLogs Java appender][cloudwatchlogs-java-appender].
4748

4849
There is a great original [manual][manual].
4950

@@ -119,3 +120,9 @@ limitations under the License.
119120
[slf4j-simple]: https://www.slf4j.org/api/org/slf4j/simple/SimpleLogger.html
120121

121122
[SimpleDateFormat]: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/text/SimpleDateFormat.html
123+
124+
[awslambda-logback]: https://github.com/jlib-framework/jlib-awslambda-logback
125+
126+
[cloudwatch-appender]: https://github.com/sndyuk/logback-more-appenders
127+
128+
[cloudwatchlogs-java-appender]: https://github.com/boxfuse/cloudwatchlogs-java-appender

src/main/java/uk/bot_by/aws_lambda/slf4j/AWSLambdaServiceProvider.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2022 Witalij Berdinskich
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package uk.bot_by.aws_lambda.slf4j;
217

318
import org.slf4j.ILoggerFactory;
@@ -7,6 +22,13 @@
722
import org.slf4j.spi.MDCAdapter;
823
import org.slf4j.spi.SLF4JServiceProvider;
924

25+
/**
26+
* Responsible for binding the {@link LambdaLoggerFactory}, the {@link BasicMarkerFactory} and the
27+
* {@link BasicMDCAdapter}. This is used by the SLF4J API.
28+
*
29+
* @author Witalij Berdinskich
30+
* @since 2.2.0
31+
*/
1032
public class AWSLambdaServiceProvider implements SLF4JServiceProvider {
1133

1234
/**

src/site/markdown/index.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,17 @@ END RequestId: cc4eb5aa-66b4-42fc-b27a-138bd672b38a
4141
```
4242

4343
The footprint of **slf4j-aws-lambda** (68K) is same size as **slf4j-simple** (64K) and much smaller
44-
than **logback** (716K).
44+
than **logback** (716K). Other AWS centric loggers are [jlib-framework/jlib-awslambda-logback][awslambda-logback],
45+
Logback's [CloudWatch appender][cloudwatch-appender] and [CloudWatchLogs Java appender][cloudwatchlogs-appender].
4546

4647
[SLF4J]: https://www.slf4j.org/
4748

4849
[lambda]: https://aws.amazon.com/lambda/
4950

5051
[example]: https://gitlab.com/bot-by/slf4j-aws-lambda/-/tree/main/example "SLF4J for AWS Lambda Demo"
52+
53+
[awslambda-logback]: https://github.com/jlib-framework/jlib-awslambda-logback
54+
55+
[cloudwatch-appender]: https://github.com/sndyuk/logback-more-appenders
56+
57+
[cloudwatchlogs-java-appender]: https://github.com/boxfuse/cloudwatchlogs-java-appender

src/test/resources/lambda-logger-factory.properties

Whitespace-only changes.

0 commit comments

Comments
 (0)