mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Updates to Elastic logging
This commit is contained in:
parent
ae9ed0f4ee
commit
ae82bb4168
18 changed files with 150 additions and 97 deletions
|
|
@ -52,7 +52,6 @@ namespace PluralKit.Core
|
|||
|
||||
// Don't want App.Metrics/D#+ spam
|
||||
.MinimumLevel.Override("App.Metrics", LogEventLevel.Information)
|
||||
.MinimumLevel.Override("DSharpPlus", LogEventLevel.Debug)
|
||||
|
||||
// Actual formatting for these is handled in ScalarFormatting
|
||||
.Destructure.AsScalar<SystemId>()
|
||||
|
|
@ -98,14 +97,12 @@ namespace PluralKit.Core
|
|||
{
|
||||
AutoRegisterTemplate = true,
|
||||
AutoRegisterTemplateVersion = AutoRegisterTemplateVersion.ESv7,
|
||||
MinimumLogEventLevel = LogEventLevel.Verbose,
|
||||
MinimumLogEventLevel = config.ElasticLogLevel,
|
||||
IndexFormat = "pluralkit-logs-{0:yyyy.MM.dd}",
|
||||
CustomFormatter = new ScalarFormatting.Elasticsearch()
|
||||
CustomFormatter = new ScalarFormatting.Elasticsearch(),
|
||||
};
|
||||
|
||||
logCfg.WriteTo
|
||||
.Conditional(e => e.Properties.ContainsKey("Elastic"),
|
||||
c => c.Elasticsearch(elasticConfig));
|
||||
|
||||
logCfg.WriteTo.Elasticsearch(elasticConfig);
|
||||
}
|
||||
|
||||
_fn.Invoke(logCfg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue