feat(log): system information
This commit is contained in:
parent
cb28d1edee
commit
b984565b0f
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import url from "url";
|
import url from "url";
|
||||||
|
import os from 'os';
|
||||||
import { app, Menu, ipcMain, Tray, dialog } from "electron";
|
import { app, Menu, ipcMain, Tray, dialog } from "electron";
|
||||||
import createWindow from "./helpers/window";
|
import createWindow from "./helpers/window";
|
||||||
import { autoUpdater } from 'electron-updater'
|
import { autoUpdater } from 'electron-updater'
|
||||||
@ -62,6 +63,16 @@ console.log = (...d) => {
|
|||||||
logStdout.write(util.format(...d) + '\n');
|
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 = () => {
|
const getSphinxPath = () => {
|
||||||
if (fs.existsSync('./searchd')) {
|
if (fs.existsSync('./searchd')) {
|
||||||
return './searchd'
|
return './searchd'
|
||||||
|
Loading…
Reference in New Issue
Block a user