Added Logging
This commit is contained in:
parent
14bfab994d
commit
678fe8c300
@ -1,4 +1,5 @@
|
|||||||
import { DB_PATH } from "$lib/utils/constants";
|
import { DB_PATH } from "$lib/utils/constants";
|
||||||
|
import { logger } from "$lib/utils/logger";
|
||||||
import { Database, Statement } from "bun:sqlite";
|
import { Database, Statement } from "bun:sqlite";
|
||||||
|
|
||||||
export class SSLSnifferApp {
|
export class SSLSnifferApp {
|
||||||
@ -10,7 +11,10 @@ export class SSLSnifferApp {
|
|||||||
// UGLY: should be more flexible
|
// UGLY: should be more flexible
|
||||||
public static init() {
|
public static init() {
|
||||||
|
|
||||||
|
logger.debug("Initializing Database", "SSLSnifferApp")
|
||||||
|
|
||||||
if (SSLSnifferApp.initialized) {
|
if (SSLSnifferApp.initialized) {
|
||||||
|
logger.debug("database initialized Twice?", "SSLSnifferApp")
|
||||||
throw new Error("SSLSniffer has already been initialized")
|
throw new Error("SSLSniffer has already been initialized")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user