Refactor: Implement logging and JSONB cleanup

This commit is contained in:
gpt-engineer-app[bot]
2025-11-03 18:05:58 +00:00
parent b6179372e6
commit e9b9faa3e1
18 changed files with 430 additions and 142 deletions

View File

@@ -1,23 +1,18 @@
/**
* Conditional authentication logging utility
* Logs are only shown in development mode
* Uses structured logger internally
*/
const isDevelopment = import.meta.env.DEV;
import { logger } from './logger';
export const authLog = (...args: any[]) => {
if (isDevelopment) {
console.log(...args);
}
export const authLog = (...args: unknown[]) => {
logger.info('[Auth]', ...args);
};
export const authWarn = (...args: any[]) => {
if (isDevelopment) {
console.warn(...args);
}
export const authWarn = (...args: unknown[]) => {
logger.warn('[Auth]', ...args);
};
export const authError = (...args: any[]) => {
// Always log errors
console.error(...args);
export const authError = (...args: unknown[]) => {
logger.error('[Auth] Error occurred', { error: args });
};