Skip to content

Commit ff2403e

Browse files
authored
Merge pull request #728 from aws-powertools/hjgraca-docs-service
chore: add Logging Service property priority to docs
2 parents c006ee4 + 44e3b37 commit ff2403e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/core/logging.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ Setting | Description | Environment variable | Attribute parameter
3636
**Service** | Sets **Service** key that will be present across all log statements | `POWERTOOLS_SERVICE_NAME` | `Service`
3737
**Logging level** | Sets how verbose Logger should be (Information, by default) | `POWERTOOLS_LOG_LEVEL` | `LogLevel`
3838

39+
### Service Property Priority Resolution
40+
41+
The root level Service property now correctly follows this priority order:
42+
43+
1. LoggingAttribute.Service (property value set in the decorator)
44+
2. POWERTOOLS_SERVICE_NAME (environment variable)
45+
46+
3947
### Example using AWS Serverless Application Model (AWS SAM)
4048

4149
You can override log level by setting **`POWERTOOLS_LOG_LEVEL`** environment variable in the AWS SAM template.
@@ -788,4 +796,4 @@ To use a custom log formatter with AOT, pass an instance of `ILogFormatter` to `
788796

789797
While we support anonymous type serialization by converting to a `Dictionary<string, object>`, this is **not** a best practice and is **not recommended** when using native AOT.
790798

791-
We recommend using concrete classes and adding them to your `JsonSerializerContext`.
799+
We recommend using concrete classes and adding them to your `JsonSerializerContext`.

0 commit comments

Comments
 (0)