Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 9408bc7

Browse files
committed
Merge pull request #1542 from OpenBazaar/send-debug
Send Debug Email from Icon
2 parents 6e52f35 + e1788c7 commit 9408bc7

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

main.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ app.on('ready', function() {
541541
},
542542
{type: 'separator'},
543543
{label: 'View Debug Log', type: 'normal', click: function() {
544-
var debugPath = serverPath + path.sep + 'debug.txt';
544+
var debugPath = serverPath + 'debug.txt';
545545

546546
fs.writeFile(debugPath, serverOut, (err) => {
547547
if (err) {
@@ -552,6 +552,19 @@ app.on('ready', function() {
552552
require('open')(debugPath);
553553
});
554554
}},
555+
{label: 'Send Debug Package', type: 'normal', click: function() {
556+
var body = 'OpenBazaar Debug Report\n\n';
557+
body += 'OS: ' + os.platform() + ' ' + os.release() + '\n';
558+
body += 'Architecture: ' + os.arch() + '\n';
559+
body += 'CPUs: ' + JSON.stringify(os.cpus(), null, 2) + '\n';
560+
body += 'Free Memory: ' + os.freemem() + '\n';
561+
body += 'Total Memory: ' + os.totalmem() + '\n\n';
562+
body += 'Debug Log:\n';
563+
body += serverOut;
564+
565+
require('open')('mailto:[email protected]?subject=OpenBazaar Debug Report&body=' + body);
566+
567+
}},
555568
{type: 'separator'},
556569
{
557570
label: 'Quit', type: 'normal', accelerator: 'Command+Q', click: function () {

0 commit comments

Comments
 (0)