Few points I want to add here which help me.
Review logging and log data in correct category. (Verbose, Info, Error etc). Most of the time (verbose only for debugging) am using Info and Error log only.
Combined multiple lines of logs in a single line. It will reduce system-generated columns data.
Old
log.Info($"SerialNumber :" serialNumber)
log.Info($"id :" id)
log.Info($"name :" name)
New
log.Info($"SerialNumber, id, name :" serialNumber + id + name);
Check traces
collection customDimensions
. For me, a lot of system-generated data was there like thread name, logger name and class name. I did some changes in my logger, now my customDimensions
column is empty.
Reduce some system-generated logs
{
"logger": {
"categoryFilter": {
"defaultLevel": "Information",
"categoryLevels": {
"Host": "Error",
"Function": "Error",
"Host.Aggregator": "Information"
}
}
}
}
All the above points help me to reduce log data, hope it will help others.