mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 22:11:13 -05:00
Refactor: Implement logging and JSONB cleanup
This commit is contained in:
@@ -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 });
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user