LogLevel changed in CentralConfigFetcher

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:

Before:

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

Where waitingLogSeverity was set to

var waitingLogSeverity = LogLevel.Trace;

After:

_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?

1 Like

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

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.

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