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: Logging.md
+14-5
Original file line number
Diff line number
Diff line change
@@ -16,13 +16,11 @@ Refer this [document of NLog Configuration](https://nlog-project.org/config/) fo
16
16
17
17
## Setup
18
18
19
-
In order to leverage the new logging framework, it is required to install the **`NLog.Config`** package into the .NET project. This can be done using the Package Manager, steps for which can be found on the [NuGet page for the package](https://www.nuget.org/packages/NLog.Config/).
19
+
In order to leverage the new logging framework, it is required to install the **`NLog.Schema`** package into the .NET project. This can be done using the Package Manager, steps for which can be found on the [NuGet page for the package](https://www.nuget.org/packages/NLog.Config/).
20
20
21
-
When the **`NLog.Config`** package is installed, it will add two new files to the project —**`NLog.config`** and**`NLog.xsd`**.
21
+
When the **`NLog.Schema`** package is installed, it will add new file to the project —**`NLog.xsd`**.
22
22
23
-
<spanstyle="color: red;">**Note that the package name is `NLog.Config` and the name of the newly added file is `NLog.config`.**</span>
24
-
25
-
The **`Copy To Output Directory`** property of this `NLog.config` file needs to be set to **`Copy Always`**.
23
+
Create and add the **`NLog.config`** file to main directory of your source project and sample for **`NLog.config`** file is given below:
26
24
27
25
## Sample NLog.config File
28
26
@@ -59,13 +57,24 @@ The **`Copy To Output Directory`** property of this `NLog.config` file needs to
59
57
</nlog>
60
58
```
61
59
60
+
The **`Copy To Output Directory`** property of this `NLog.config` file needs to be set to **`Copy Always`**.
61
+
Or this can be done by adding below lines to your **`Project.csproj`** file.
* The logger name in the rule must match the **'Logger name of the Logger object'**. It can include wildcard characters (`*`, `?`).
65
73
* The logger name can be the namespace from which logging statements should be honored.
66
74
* In case `name="*"` is used, all logging statements from all namespaces will be written to log. This will include logging statements from inside the SDK as well.
67
75
* If logging statements from inside the SDK should not be logged, provide specific namespaces in the rules.
68
76
* The `minlevel` field denotes the minimum level to log. In a production environment, this may be set to `Warn`.
77
+
* The variable `globalThreshold` needs to be set to `Off` in case you want to turn off the logging in Nlog.config file.
69
78
* The variable `enableMasking` needs to be set to `true` if sensitive data in the request/response should be hidden/masked.
0 commit comments