Skip to content

Commit 8b13761

Browse files
Update readme 📝
1 parent c041a61 commit 8b13761

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,29 @@ var complexFiler = new CompoundFilter(
120120
- [x] Retrieve your token's bot user
121121
- [x] Search
122122

123+
## Enable internal logs
124+
The library make use of `ILoggerFactory` interface exposed by `Microsoft.Extensions.Logging`. Which allow you to have ability to enable the internal logs when developing application to get additional information.
125+
126+
To enable logging you need to add the below code at startup of the application.
127+
128+
```csharp
129+
// pass the ILoggerFactory instance
130+
NotionClientLogging.ConfigureLogger(logger);
131+
132+
```
133+
134+
You can set the LogLevel in config file.
135+
```json
136+
{
137+
"Logging": {
138+
"LogLevel": {
139+
"Notion.Client": "Trace"
140+
}
141+
}
142+
}
143+
```
144+
145+
You can also refer `examples/list-users` example.
123146

124147
## Contributors
125148
This project exists thanks to all the people who contribute.

docs/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,30 @@ var complexFiler = new CompoundFilter(
8787
- [x] Retrieve your token's bot user
8888
- [x] Search
8989

90+
## Enable internal logs
91+
The library make use of `ILoggerFactory` interface exposed by `Microsoft.Extensions.Logging`. Which allow you to have ability to enable the internal logs when developing application to get additional information.
92+
93+
To enable logging you need to add the below code at startup of the application.
94+
95+
```csharp
96+
// pass the ILoggerFactory instance
97+
NotionClientLogging.ConfigureLogger(logger);
98+
99+
```
100+
101+
You can set the LogLevel in config file.
102+
```json
103+
{
104+
"Logging": {
105+
"LogLevel": {
106+
"Notion.Client": "Trace"
107+
}
108+
}
109+
}
110+
```
111+
112+
You can also refer `examples/list-users` example.
113+
90114
## Contribution Guideline
91115

92116
Hello! Thank you for choosing to help contribute to this open source library. There are many ways you can contribute and help is always welcome. You can read the detailed [Contribution Guideline](https://github.com/notion-dotnet/notion-sdk-net/blob/main/CONTRIBUTING.md) defined here - we will continue to improve it.

0 commit comments

Comments
 (0)