Skip to content

Commit

Permalink
Desktop: document log file location
Browse files Browse the repository at this point in the history
  • Loading branch information
kidroca committed Jul 27, 2022
1 parent bfbdd4e commit 9ff9058
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Testing the auto-update process can be a little involved. The most effective way

**Note:** In order to test with a notarized build you'll need to have a paid Apple developer account.

You can inspect auto update related logs in the log file at `~/Library/Logs/new.expensify.desktop/main.log`

## Setting up Min.IO
Rather than pushing new builds to the production S3 bucket, the best way to test locally is to use [Min.IO](https://min.io). Min.IO is an S3-compatible service that you can set up and deploy locally. In order to set up a local Min.IO instance to emulate an S3 bucket, follow these steps:

Expand Down Expand Up @@ -139,3 +141,9 @@ To see the actual `app.asar` content run the following script
npx asar extract desktop-build/mac/New\ Expensify.app/Contents/Resources/app.asar ./unpacked-asar
```
The expected size of `app.asar` = `desktop/dist/www/` + `desktop/node_modules/`;


# Logging

- `main` process logs are written to `~/Library/Logs/new.expensify.desktop/main.log`
- `renderer` logs can be observed live in the developer console (⌘ Cmd + ⌥ Option + I)
4 changes: 2 additions & 2 deletions desktop/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ app.commandLine.appendSwitch('enable-network-information-downlink-max');
// See https://github.com/sindresorhus/electron-context-menu
contextMenu();

// Send all autoUpdater logs to a log file: ~/Library/Logs/new.expensify/main.log
// Send all autoUpdater logs to a log file: ~/Library/Logs/new.expensify.desktop/main.log
// See https://www.npmjs.com/package/electron-log
autoUpdater.logger = log;
autoUpdater.logger.transports.file.level = 'info';

// Send all Console logs to a log file: ~/Library/Logs/new.expensify/main.log
// Send all Console logs to a log file: ~/Library/Logs/new.expensify.desktop/main.log
// See https://www.npmjs.com/package/electron-log
_.assign(console, log.functions);

Expand Down

0 comments on commit 9ff9058

Please sign in to comment.