This repository was archived by the owner on Jun 4, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +51
-5
lines changed
main/java/uk/bot_by/aws_lambda/slf4j Expand file tree Collapse file tree 6 files changed +51
-5
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ All notable changes to this project will be documented in this file.
44The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
55and 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
Original file line number Diff line number Diff line change 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 -->
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 >
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 >
Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ END RequestId: cc4eb5aa-66b4-42fc-b27a-138bd672b38a
4343```
4444
4545The 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
4849There 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
Original file line number Diff line number Diff line change 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+ */
116package uk .bot_by .aws_lambda .slf4j ;
217
318import org .slf4j .ILoggerFactory ;
722import org .slf4j .spi .MDCAdapter ;
823import 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+ */
1032public class AWSLambdaServiceProvider implements SLF4JServiceProvider {
1133
1234 /**
Original file line number Diff line number Diff line change @@ -41,10 +41,17 @@ END RequestId: cc4eb5aa-66b4-42fc-b27a-138bd672b38a
4141```
4242
4343The 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
You can’t perform that action at this time.
0 commit comments