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

Commit aa9cee8

Browse files
committed
Add site
1 parent c3738a7 commit aa9cee8

24 files changed

+333
-2
lines changed

.gitlab-ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,14 @@ spotbugs-sast:
4848
SAST_JAVA_VERSION: 11
4949
before_script:
5050
- rm -rf example
51+
52+
pages:
53+
stage: deploy
54+
script:
55+
- cp changelog.md src/site/markdown
56+
- mvn clean verify site -Pjavadocs
57+
- mv target/site public
58+
- mv target/apidocs public
59+
artifacts:
60+
paths:
61+
- public

pom.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,20 @@
5050
</developer>
5151
</developers>
5252

53+
<scm>
54+
<url>https://gitlab.com/bot-by/slf4j-aws-lambda</url>
55+
<connection>scm:git:https://gitlab.com/bot-by/slf4j-aws-lambda.git</connection>
56+
<developerConnection>scm:git:[email protected]:bot-by/slf4j-aws-lambda.git</developerConnection>
57+
</scm>
58+
<issueManagement>
59+
<system>GitLab</system>
60+
<url>https://gitlab.com/bot-by/slf4j-aws-lambda/-/issues</url>
61+
</issueManagement>
62+
<ciManagement>
63+
<system>GitLab</system>
64+
<url>https://gitlab.com/bot-by/slf4j-aws-lambda/-/pipelines</url>
65+
</ciManagement>
66+
5367
<properties>
5468
<!-- version -->
5569
<revision>1.0.0</revision>
@@ -137,11 +151,13 @@
137151
<groupId>uk.org.webcompere</groupId>
138152
<artifactId>system-stubs-core</artifactId>
139153
<version>${system-stubs.version}</version>
154+
<scope>test</scope>
140155
</dependency>
141156
<dependency>
142157
<groupId>uk.org.webcompere</groupId>
143158
<artifactId>system-stubs-jupiter</artifactId>
144159
<version>${system-stubs.version}</version>
160+
<scope>test</scope>
145161
</dependency>
146162
</dependencies>
147163

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
An [SLF4J][] Logger implementation for [AWS Lambda][lambda].
44

5-
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/dda626a02daf464c94aa10955a6b8f6b)](https://www.codacy.com/gl/bot-by/slf4j-aws-lambda/dashboard?utm_source=gitlab.com&utm_medium=referral&utm_content=bot-by/slf4j-aws-lambda&utm_campaign=Badge_Grade)
6-
[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/dda626a02daf464c94aa10955a6b8f6b)](https://www.codacy.com/gl/bot-by/slf4j-aws-lambda/dashboard?utm_source=gitlab.com&utm_medium=referral&utm_content=bot-by/slf4j-aws-lambda&utm_campaign=Badge_Coverage)
5+
[![Codacy Grade](https://app.codacy.com/project/badge/Grade/dda626a02daf464c94aa10955a6b8f6b)](https://www.codacy.com/gl/bot-by/slf4j-aws-lambda/dashboard?utm_source=gitlab.com&utm_medium=referral&utm_content=bot-by/slf4j-aws-lambda&utm_campaign=Badge_Grade)
6+
[![Codacy Coverage](https://app.codacy.com/project/badge/Coverage/dda626a02daf464c94aa10955a6b8f6b)](https://www.codacy.com/gl/bot-by/slf4j-aws-lambda/dashboard?utm_source=gitlab.com&utm_medium=referral&utm_content=bot-by/slf4j-aws-lambda&utm_campaign=Badge_Coverage)
77

88
## Getting started
99

src/site/markdown/acquire.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Acquire
2+
3+
The package is not published to Maven Central yet.
4+
Use bot-by's GitLab repository instead, please:
5+
6+
```language-xml
7+
8+
<repositories>
9+
<repository>
10+
<id>bot-by-maven</id>
11+
<url>https://gitlab.com/api/v4/groups/7239110/-/packages/maven</url>
12+
</repository>
13+
</repositories>
14+
```
15+
16+
Please add dependency to your project:
17+
18+
```language-xml
19+
20+
<dependency>
21+
<groupId>uk.bot-by</groupId>
22+
<artifactId>slf4j-aws-lambda</artifactId>
23+
<version>1.0.0</version>
24+
</dependency>
25+
```

src/site/markdown/changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Change Log
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
5+
and this project adheres to [Semantic Versioning](http://semver.org/).

src/site/markdown/contributing.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Contributing to SLF4J for AWS Lambda
2+
3+
**SLF4J for AWS Lambda** is an open-source project and all contributions are welcome to assist with its
4+
development and maintenance.
5+
6+
## Issues (bug and feature tracker)
7+
8+
Please report any bugs found, feature requests or other issues on
9+
**SLF4J for AWS Lambda** [GitLab tracker][gitlab-issues]
10+
or [GitHub tracker][github-issues].
11+
12+
When creating a new issue, try following [necolas's guidelines][issue-guidelines].
13+
14+
## Fork, patch and contribute code
15+
16+
Feel free to fork **SLF4J for AWS Lambda**'s repository at [GitLab][bot-gitlab]
17+
or [GitHub][bot-github] for your own use and updates.
18+
19+
Contribute your fixes and new features back to the main codebase using
20+
[GitLab merge requests][gitlab-merge-requests]
21+
and [GitHub pull requests][github-pull-requests].
22+
23+
[gitlab-issues]: https://gitlab.com/bot-by/slf4j-aws-lambda/-/issues
24+
[github-issues]: https://github.com/bot-by/slf4j-aws-lambda/issues
25+
[issue-guidelines]: http://github.com/necolas/issue-guidelines/#readme
26+
[bot-gitlab]: https://gitlab.com/bot-by/slf4j-aws-lambda/
27+
[bot-github]: https://github.com/bot-by/slf4j-aws-lambda/
28+
[gitlab-merge-requests]: https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html
29+
[github-pull-requests]: https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request

src/site/markdown/index.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# SLF4J for AWS Lambda
2+
3+
An [SLF4J][] Logger implementation for [AWS Lambda][lambda].
4+
5+
[![Codacy Grade](https://app.codacy.com/project/badge/Grade/dda626a02daf464c94aa10955a6b8f6b)](https://www.codacy.com/gl/bot-by/slf4j-aws-lambda/dashboard?utm_source=gitlab.com&utm_medium=referral&utm_content=bot-by/slf4j-aws-lambda&utm_campaign=Badge_Grade)
6+
[![Codacy Coverage](https://app.codacy.com/project/badge/Coverage/dda626a02daf464c94aa10955a6b8f6b)](https://www.codacy.com/gl/bot-by/slf4j-aws-lambda/dashboard?utm_source=gitlab.com&utm_medium=referral&utm_content=bot-by/slf4j-aws-lambda&utm_campaign=Badge_Coverage)
7+
8+
## Getting started
9+
10+
Yet another SLF4J Simple, isn't it?
11+
12+
No, it isn't. This implementation supports MDC to print out **AWS request ID** in start of every
13+
logging record.
14+
15+
The sample code, see the folder **[example][]** :
16+
17+
```language-java
18+
@Override
19+
public String handleRequest(Map<String, Object> input,Context context){
20+
MDC.put(LambdaLogger.AWS_REQUEST_ID,context.getAwsRequestId());
21+
logger.trace("trace message");
22+
logger.debug("debug message");
23+
logger.info("info message");
24+
logger.warn("warning message");
25+
logger.error("error message");
26+
return"done";
27+
}
28+
```
29+
30+
The log:
31+
32+
```language-log
33+
START RequestId: cc4eb5aa-66b4-42fc-b27a-138bd672b38a Version: $LATEST
34+
cc4eb5aa-66b4-42fc-b27a-138bd672b38a INFO uk.bot_by.bot.slf4j_demo.BotHandler - info message
35+
cc4eb5aa-66b4-42fc-b27a-138bd672b38a WARN uk.bot_by.bot.slf4j_demo.BotHandler - warning message
36+
cc4eb5aa-66b4-42fc-b27a-138bd672b38a ERROR uk.bot_by.bot.slf4j_demo.BotHandler - error message
37+
END RequestId: cc4eb5aa-66b4-42fc-b27a-138bd672b38a
38+
```
39+
40+
[SLF4J]: https://www.slf4j.org/
41+
42+
[lambda]: https://aws.amazon.com/lambda/
43+
44+
[example]: https://gitlab.com/bot-by/slf4j-aws-lambda/-/tree/main/example "SLF4J for AWS Lambda Demo"

src/site/markdown/info.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Project Information
2+
3+
Additional information and reports can be found here.
4+
5+
## Project reports
6+
7+
|Report|Description|
8+
|---|---|
9+
|[Project Summary](./summary.html)|General information about the project.|
10+
|[License](./licenses.html)|Information about the license used by the project.|
11+
|[Team](./team.html)|The members of this project.|

src/site/markdown/usage.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Usage
2+
3+
There is a great original [manual][manual].
4+
5+
The configuration is similar to [SLF4J Simple][slf4j-simple].
6+
7+
It looks for the `lambda-logger.properties` resource and read properties:
8+
9+
* **dateTimeFormat** - The date and time format to be used in the output messages. The pattern
10+
describing the date and time format is defined by [SimpleDateFormat][]. If the format is not
11+
specified or is invalid, the number of milliseconds since start up will be output.
12+
* **defaultLogLevel** - Default log level for all instances of LambdaLogger.
13+
Must be one of (_trace_, _debug_, _info_, _warn_, _error_), a value is case-insensitive.
14+
If not specified, defaults to _info_.
15+
* **levelInBrackets** - Should the level string be output in brackets? Defaults to `false`.
16+
* **showDateTime** - Set to `true` if you want the current date and time to be included in output
17+
messages. Defaults to `false`.
18+
* **showLogName** - Set to `true` if you want the Logger instance name to be included in output
19+
messages. Defaults to `true`.
20+
* **showShortLogName** - Set to `true` if you want the last component of the name to be included in
21+
output messages. Defaults to `false`.
22+
* **showThreadId** - If you would like to output the current thread id, then set to `true`.
23+
Defaults to `false`.
24+
* **showThreadName** - Set to `true` if you want to output the current thread name.
25+
Defaults to `false`.
26+
27+
The environment variables overrides the properties: **LOG_DATE_TIME_FORMAT**, **LOG_DEFAULT_LEVEL**,
28+
**LOG_LEVEL_IN_BRACKETS**, **LOG_SHOW_DATE_TIME**, **LOG_SHOW_NAME**, **LOG_SHOW_SHORT_NAME**,
29+
**LOG_SHOW_THREAD_ID**, **LOG_SHOW_THREAD_NAME**.
20.4 KB
Loading

0 commit comments

Comments
 (0)