Skip to content

Commit e1ddebe

Browse files
docs: Readme update (#72)
1 parent 38c4803 commit e1ddebe

File tree

2 files changed

+3
-20
lines changed

2 files changed

+3
-20
lines changed

README.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -67,27 +67,9 @@ And configure the aspectj-maven-plugin to compile-time weave (CTW) the aws-lambd
6767
```
6868
**Note:** If you are working with Lambda on runtime post java8, please refer [issue](https://github.com/awslabs/aws-lambda-powertools-java/issues/50) for workaround
6969

70-
### Logging Configuration
71-
Powertools extends the functionality of Log4J. Below is an example `log4j2.xml` file, with the `LambdaJsonLayout` configured.
70+
## Example
7271

73-
```xml
74-
<?xml version="1.0" encoding="UTF-8"?>
75-
<Configuration packages="com.amazonaws.services.lambda.runtime.log4j2">
76-
<Appenders>
77-
<Console name="JsonAppender" target="SYSTEM_OUT">
78-
<LambdaJsonLayout compact="true" eventEol="true"/>
79-
</Console>
80-
</Appenders>
81-
<Loggers>
82-
<Logger name="JsonLogger" level="INFO" additivity="false">
83-
<AppenderRef ref="JsonAppender"/>
84-
</Logger>
85-
<Root level="info">
86-
<AppenderRef ref="JsonAppender"/>
87-
</Root>
88-
</Loggers>
89-
</Configuration>
90-
```
72+
See **[example](./example/README.md)** of all features, and a SAM template with all Powertools env vars.
9173

9274
## Credits
9375

example/template.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Resources:
2121
Environment: # More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object
2222
Variables:
2323
POWERTOOLS_SERVICE_NAME: "Payment Service"
24+
LOG_LEVEL: INFO
2425
Tracing: Active
2526
Events:
2627
HelloWorld:

0 commit comments

Comments
 (0)