import LogManager from '../manager/logManager';
import LogLevelManager from '../manager/logLevelManager';
import localStorage from './localStorage';

/**
 * 系统日志
 */
export const sysLogger = new LogManager({
  tag: 'System',
  level: LogManager.LEVELS.Info.level
});

/**
 * 静默系统日志
 */
export const silenceLogger = new LogManager({
  tag: 'System',
  level: LogManager.LEVELS.Info.level,
  closeReport: true
});

/**
 * 实例化日志
 */
const defLogger = new LogManager();

// 日志等级处理
export const loggerLevel = new LogLevelManager({
  loggers: [defLogger, sysLogger, silenceLogger],
  localStorage,
});

export default defLogger;
