function log(level, message, payload) {
    const time = new Date().toISOString();
    if (payload) {
        console[level === 'info' ? 'log' : level](`[${time}] [${level.toUpperCase()}] ${message}`, payload);
        return;
    }
    console[level === 'info' ? 'log' : level](`[${time}] [${level.toUpperCase()}] ${message}`);
}
export const logger = {
    info: (message, payload) => log('info', message, payload),
    warn: (message, payload) => log('warn', message, payload),
    error: (message, payload) => log('error', message, payload)
};
