# LogLevel changed in CentralConfigFetcher

**URL:** <https://discuss.elastic.co/t/loglevel-changed-in-centralconfigfetcher/284413>\
**Category:** APM\
**Tags:** dotnet\
**Created:** [September 16, 2021, 2:32pm UTC](https://discuss.elastic.co/t/loglevel-changed-in-centralconfigfetcher/284413 "2021-09-16T14:32:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gerardpeters](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gerardpeters/32/94684_2.png) [@gerardpeters](https://discuss.elastic.co/u/gerardpeters)\
**Post date:** [September 16, 2021, 2:32pm UTC](https://discuss.elastic.co/t/loglevel-changed-in-centralconfigfetcher/284413/1 "2021-09-16T14:32:47Z")

</div>

Hi,

I've upgraded to .net agent 1.11.1 and there is a code change that changed to loglevel from trace to info.

See:

> <https://github.com/elastic/apm-agent-dotnet/commit/f97a2e17efe466a20b526ccadd269264943b04e6#diff-9accb79784bd2ccde4608b9ad2348abd98e7678ad2819dc886283a1ed199cb4f>
>
> This commit sanitizes the request URI and headers of
> request to fetch central c…onfiguration, to redact username/password info
> and sensitive headers.
> 
> \- Move sanitization methods to separate Santization helper class.
> \- Add test to assert central config sensitive request details are redacted.
> \- Use Consts.Redacted wherever "\[REDACTED\]" is needed.
> 
> Fixes #1376

Before:

```auto
_logger.IfLevel(waitingLogSeverity)
				?.Log("Waiting {WaitInterval}... {WaitReason}. dbgIterationsCount: {dbgIterationsCount}."

```

Where `waitingLogSeverity` was set to

```auto
var waitingLogSeverity = LogLevel.Trace;

```

After:

```auto
_logger.Info()?.Log("Waiting {WaitInterval}... {WaitReason}. dbgIterationsCount: {dbgIterationsCount}."
					, waitInfo.Interval.ToHms(), waitInfo.Reason, _dbgIterationsCount);

```

This leads to a significant increase of records in the logs. Is this intentional, and if so how can I ignore these log lines?

---

<div class="post-metadata">

**Author:** ![GregKalapos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gregkalapos/32/37205_2.png) [@GregKalapos](https://discuss.elastic.co/u/GregKalapos)\
**Post date:** [September 27, 2021, 2:54pm UTC](https://discuss.elastic.co/t/loglevel-changed-in-centralconfigfetcher/284413/2 "2021-09-27T14:54:32Z")

</div>

Thanks for reporting @gerardpeters,

I think we did not really intend to change the level of this line - I can see that now on info level you'll have this log each time the agent fetches central config.

I opened a PR to address this: [Change log level in CentralConfigurationFetcher.cs by gregkalapos · Pull Request #1501 · elastic/apm-agent-dotnet · GitHub](https://github.com/elastic/apm-agent-dotnet/pull/1501)

Regarding:

> how can I ignore these log lines?

Right now, the only way is to use a log level which is higher than info. Unfortunately I don't have another option until the PR is merged and released.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 18, 2021, 10:55am UTC](https://discuss.elastic.co/t/loglevel-changed-in-centralconfigfetcher/284413/3 "2021-10-18T10:55:15Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
