config.js 558 B

12345678910111213141516171819202122232425
  1. 'use strict';
  2. const path = require('path');
  3. const dayjs = require('dayjs');
  4. exports.get = function () {
  5. const _config = {
  6. log: {
  7. file: {
  8. fileName: path.join(__dirname, '../logs/electron-' + dayjs().format('YYYY-MM-DD') + '.log'),
  9. level: 'silly', // error, warn, info, verbose, debug, silly
  10. format: '[{y}-{m}-{d} {h}:{i}:{s}.{ms}] [{level}] {text}',
  11. maxSize: '1048576' // 1048576 (1mb) by default.
  12. }
  13. }
  14. }
  15. return _config;
  16. };
  17. exports.setup = function () {
  18. return true;
  19. };
  20. exports = module.exports;