feat: respect context in server
This commit is contained in:
parent
06049169a2
commit
f5436f5ee3
32 changed files with 359 additions and 204 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue