/**
 * 配置日志函数
 */
const log = require('electron-log');
const dpath=require('path')
let config_log={
  setlog:function (configs,path){
    log.transports.file.level = configs.log_file_level;
    log.transports.console.level = configs.log_console_level;
    log.transports.file.fileName = configs.log_fileName;
    log.transports.file.format = configs.log_date_format;
    log.transports.file.maxSize = configs.log_maxSize;
    let logUrl=configs.log_resolvePath;
    logUrl=logUrl.replaceAll("/",dpath.sep);
    log.transports.file.resolvePath = () => path +dpath.sep+ logUrl;
  },
  clog:log
}

module.exports=config_log;