From b38ab19c3ed3f369bea1549055a6072ac2a12c90 Mon Sep 17 00:00:00 2001 From: Yuri Tatishchev Date: Thu, 9 Jan 2025 15:01:03 -0800 Subject: [PATCH] WIP: more proper logging --- bunfig.toml | 1 + src/lib/server/opnsense/index.ts | 2 +- src/routes/auth/authentik/callback/+server.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 bunfig.toml diff --git a/bunfig.toml b/bunfig.toml new file mode 100644 index 0000000..befb378 --- /dev/null +++ b/bunfig.toml @@ -0,0 +1 @@ +logLevel = "info" \ No newline at end of file diff --git a/src/lib/server/opnsense/index.ts b/src/lib/server/opnsense/index.ts index 6f4618b..5777240 100644 --- a/src/lib/server/opnsense/index.ts +++ b/src/lib/server/opnsense/index.ts @@ -30,7 +30,7 @@ export async function fetchOpnsenseServer() { const uuid = servers.rows.find((server) => server.name === opnsenseIfname)?.uuid; assert(uuid, 'Failed to find server UUID for OPNsense WireGuard server'); serverUuid = uuid; - console.log('OPNsense WireGuard server UUID:', serverUuid); + console.info('OPNsense WireGuard server UUID:', serverUuid); const resServerInfo = await fetch( `${opnsenseUrl}/api/wireguard/client/get_server_info/${serverUuid}`, diff --git a/src/routes/auth/authentik/callback/+server.ts b/src/routes/auth/authentik/callback/+server.ts index f7c6f63..19c64cb 100644 --- a/src/routes/auth/authentik/callback/+server.ts +++ b/src/routes/auth/authentik/callback/+server.ts @@ -35,7 +35,7 @@ export async function GET(event: RequestEvent): Promise { }); } const claims = decodeIdToken(tokens.idToken()) as { sub: string, preferred_username: string, name: string }; - console.log("claims", claims); + console.info("claims", claims); const userId: string = claims.sub; const username: string = claims.preferred_username;