You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,29 @@ var complexFiler = new CompoundFilter(
120
120
-[x] Retrieve your token's bot user
121
121
-[x] Search
122
122
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.
123
146
124
147
## Contributors
125
148
This project exists thanks to all the people who contribute.
Copy file name to clipboardExpand all lines: docs/README.md
+24
Original file line number
Diff line number
Diff line change
@@ -87,6 +87,30 @@ var complexFiler = new CompoundFilter(
87
87
-[x] Retrieve your token's bot user
88
88
-[x] Search
89
89
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
+
90
114
## Contribution Guideline
91
115
92
116
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