added timestamps to app console logs

This commit is contained in:
dswbx
2025-02-22 13:18:23 +01:00
parent 82fba39684
commit 147d6b7ff7
3 changed files with 44 additions and 3 deletions

View File

@@ -2,7 +2,15 @@
import type { App } from "App";
import { tbValidator as tb } from "core";
import { StringEnum, Type, TypeInvalidError } from "core/utils";
import {
StringEnum,
Type,
TypeInvalidError,
datetimeStringLocal,
datetimeStringUTC,
getTimezone,
getTimezoneOffset
} from "core/utils";
import { getRuntimeKey } from "core/utils";
import type { Context, Hono } from "hono";
import { Controller } from "modules/Controller";
@@ -273,7 +281,13 @@ export class SystemController extends Controller {
hono.get("/info", (c) =>
c.json({
version: c.get("app")?.version(),
runtime: getRuntimeKey()
runtime: getRuntimeKey(),
timezone: {
name: getTimezone(),
offset: getTimezoneOffset(),
local: datetimeStringLocal(),
utc: datetimeStringUTC()
}
})
);