refactor: reorganize logger module and update proxy display
Move logger.js from root to utils directory for better project structure Update InstanceDetail view to show full remote address instead of just port
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { postLog } from '../../logger.js';
|
||||
import { postLog } from './logger.js';
|
||||
|
||||
function showNotification(message, type = 'info') {
|
||||
const icons = {
|
||||
|
||||
9
src/utils/logger.js
Normal file
9
src/utils/logger.js
Normal file
@@ -0,0 +1,9 @@
|
||||
const postLog={
|
||||
debug: (msg) => console.log(`[${new Date().toISOString()} - \x1b[34mDEBUG\x1b[0m] ${msg}`),
|
||||
info: (msg) => console.log(`[${new Date().toISOString()} - \x1b[32mINFO\x1b[0m] ${msg}`),
|
||||
warn: (msg) => console.warn(`[${new Date().toISOString()} - \x1b[33mWARN\x1b[0m] ${msg}`),
|
||||
error: (msg) => console.error(`[${new Date().toISOString()} - \x1b[35mERROR\x1b[0m] ${msg}`),
|
||||
fatal: (msg) => console.error(`[${new Date().toISOString()} - \x1b[31mFATAL\x1b[0m] ${msg}`)
|
||||
}
|
||||
|
||||
export { postLog };
|
||||
Reference in New Issue
Block a user