Skip to content

Commit

Permalink
Merge pull request #19742 from tippmar-nr/dotnet-logging-configuratio…
Browse files Browse the repository at this point in the history
…n-update

docs(dotnet): Update log configuration documentations to reflect behavior in the latest agent version.
  • Loading branch information
adutta-newrelic authored Jan 23, 2025
2 parents d0447cf + 64efaec commit 1aa3c79
Showing 1 changed file with 34 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ The `proxy` element supports the following attributes:

### Log element [#log]

The `log` element is a child of the `configuration` element. The `log` element configures New Relic's logging . The agent generates its own log file to keep its logging information separate from your application's logs.
The `log` element is a child of the `configuration` element. The `log` element configures New Relic's logging. The agent generates its own log file to keep its logging information separate from your application's logs.

```xml
<log enabled="true"
Expand All @@ -1072,8 +1072,8 @@ The `log` element supports the following attributes:

<CollapserGroup>
<Collapser
id="log-level"
title="level"
id="log-enabled"
title="enabled"
>
<table>
<tbody>
Expand All @@ -1083,7 +1083,7 @@ The `log` element supports the following attributes:
</th>

<td>
String
Boolean
</td>
</tr>

Expand All @@ -1093,32 +1093,18 @@ The `log` element supports the following attributes:
</th>

<td>
`info`
`true`
</td>
</tr>
</tbody>
</table>

Defines the level of detail recorded in the log file. Possible values, in increasing order of detail, are:

* `off`
* `error`
* `warn`
* `info`
* `debug`
* `finest`
* `all`

Alternatively, set the `NEWRELIC_LOG_LEVEL` environment variable in the application's environment.

<Callout variant="important">
Increasing the log level will increase New Relic's performance impact.
</Callout>
When set to `false`, all logging is disabled. Alternatively, set the `NEW_RELIC_LOG_ENABLED` environment variable in the application's environment.
</Collapser>

<Collapser
id="log-auditLog"
title="auditLog"
id="log-level"
title="level"
>
<table>
<tbody>
Expand All @@ -1128,7 +1114,7 @@ The `log` element supports the following attributes:
</th>

<td>
Boolean
String
</td>
</tr>

Expand All @@ -1138,18 +1124,32 @@ The `log` element supports the following attributes:
</th>

<td>
`false`
`info`
</td>
</tr>
</tbody>
</table>

Records all data sent to and received from New Relic in both an auditlog log file and the standard log file.
Defines the level of detail recorded in the log file. Possible values, in increasing order of detail, are:

* `off`
* `error`
* `warn`
* `info`
* `debug`
* `finest`
* `all`

Alternatively, set the `NEWRELIC_LOG_LEVEL` environment variable in the application's environment.

<Callout variant="important">
Increasing the log level will increase New Relic's performance impact.
</Callout>
</Collapser>

<Collapser
id="log-console"
title="console"
id="log-auditLog"
title="auditLog"
>
<table>
<tbody>
Expand All @@ -1175,12 +1175,12 @@ The `log` element supports the following attributes:
</tbody>
</table>

Send log messages to the console, in addition to the log file. Alternatively, set the `NEW_RELIC_LOG_CONSOLE` environment variable in the application's environment.
Records all data sent to and received from New Relic in both an auditlog log file and the standard log file. Ignored if `enabled` is set to `false` or `console` is set to `true`.
</Collapser>

<Collapser
id="log-enabled"
title="enabled"
id="log-console"
title="console"
>
<table>
<tbody>
Expand All @@ -1200,13 +1200,15 @@ The `log` element supports the following attributes:
</th>

<td>
`true`
`false`
</td>
</tr>
</tbody>
</table>

If disabled, no logging is attempted. Intended for read-only file systems. Alternatively, set the `NEW_RELIC_LOG_ENABLED` environment variable in the application's environment.
Send log messages to the console instead of the log file (in agent versions prior to 10.35.0, logs are sent to both the console and the log file). Ignored if `enabled` is set to `false`. Alternatively, set the `NEW_RELIC_LOG_CONSOLE` environment variable in the application's environment.

Console logging in the profiler is limited to `info` level and higher due to performance considerations.
</Collapser>

<Collapser
Expand Down

0 comments on commit 1aa3c79

Please sign in to comment.