WIP: more proper logging

This commit is contained in:
Yuri Tatishchev 2025-01-09 15:01:03 -08:00
parent 80acec720c
commit b38ab19c3e
Signed by: CaZzzer
GPG Key ID: E0EBF441EA424369
3 changed files with 3 additions and 2 deletions

1
bunfig.toml Normal file
View File

@ -0,0 +1 @@
logLevel = "info"

View File

@ -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}`,

View File

@ -35,7 +35,7 @@ export async function GET(event: RequestEvent): Promise<Response> {
});
}
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;