feat: respect context in server

This commit is contained in:
Aarnav Tale 2025-02-19 18:09:42 -05:00
parent 06049169a2
commit f5436f5ee3
No known key found for this signature in database
32 changed files with 359 additions and 204 deletions

View file

@ -3,16 +3,6 @@ export function hp_loadLogger(debug: boolean) {
log.debug = (category: string, message: string, ...args: unknown[]) => {
defaultLog('DEBG', category, message, ...args);
};
log.info('CFGX', 'Debug logging enabled');
log.info(
'CFGX',
'This is very verbose and should only be used for debugging purposes',
);
log.info(
'CFGX',
'If you run this in production, your storage WILL fill up quickly',
);
}
}
@ -43,4 +33,10 @@ function defaultLog(
console.log(`${date} (${level}) [${category}] ${message}`, ...args);
}
export function noContext() {
return new Error(
'Context is not loaded. This is most likely a configuration error with your reverse proxy.',
);
}
export default log;