electron-log
最后更新于:2022-04-02 03:34:52
[TOC]
> [https://www.npmjs.com/package/electron-log](https://www.npmjs.com/package/electron-log)
## 设置是否输出位置
```
log.transports.file.level = false; //是否输出到 日志文件
log.transports.console.level = false; //是否输出到 控制台
```
日志文件位置
```
on Linux: ~/.config//log.log
on macOS: ~/Library/Logs//log.log
on Windows: %USERPROFILE%\AppData\Roaming\\log.log
```
```
log.error('error!');
log.info('info!');
log.warn('warn!');
log.verbose('verbose!');
log.debug('debug!');
log.silly('silly!');
```
';