feat: show bot version on startup and in /catalogger ping
This commit is contained in:
parent
a22057b9fa
commit
5ac607fd0a
6 changed files with 66 additions and 4 deletions
|
|
@ -186,9 +186,15 @@ public static class StartupExtensions
|
|||
|
||||
public static async Task Initialize(this WebApplication app)
|
||||
{
|
||||
await BuildInfo.ReadBuildInfo();
|
||||
|
||||
await using var scope = app.Services.CreateAsyncScope();
|
||||
var logger = scope.ServiceProvider.GetRequiredService<ILogger>().ForContext<Program>();
|
||||
logger.Information("Starting Catalogger.NET");
|
||||
logger.Information(
|
||||
"Starting Catalogger.NET {Version} ({Hash})",
|
||||
BuildInfo.Version,
|
||||
BuildInfo.Hash
|
||||
);
|
||||
|
||||
CataloggerMetrics.Startup = scope
|
||||
.ServiceProvider.GetRequiredService<IClock>()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue