Skip to content

Commit

Permalink
feat(log): system information
Browse files Browse the repository at this point in the history
  • Loading branch information
DEgITx committed Feb 12, 2018
1 parent 1e5392d commit 023d33f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/background/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import path from "path";
import url from "url";
import os from 'os';
import { app, Menu, ipcMain, Tray, dialog } from "electron";
import createWindow from "./helpers/window";
import { autoUpdater } from 'electron-updater'
Expand Down Expand Up @@ -62,6 +63,16 @@ console.log = (...d) => {
logStdout.write(util.format(...d) + '\n');
};

// print os info
console.log('Rats', app.getVersion())
console.log('Platform:', os.platform())
console.log('Arch:', os.arch())
console.log('OS Release:', os.release())
console.log('CPU:', os.cpus()[0].model)
console.log('CPU Logic cores:', os.cpus().length)
console.log('Total memory:', (os.totalmem() / (1024 * 1024)).toFixed(2), 'MB')
console.log('Free memory:', (os.freemem() / (1024 * 1024)).toFixed(2), 'MB')

const getSphinxPath = () => {
if (fs.existsSync('./searchd')) {
return './searchd'
Expand Down

0 comments on commit 023d33f

Please sign in to comment.