App: [HOLD for payment 2022-08-11] [$250] Electron log file not working

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

Run a console.log in the Electron application.

Expected Result:

The log should be added to a log file for the app located at ~/Library/Logs/new.expensify/main.log

Actual Result:

The latest log in my ~/Library/Logs/new.expensify/main.log file is from 4 months ago.

Workaround:

n/a

Platform:

Where is this issue occurring?

  • Desktop App

Version Number: 1.1.82-3 Reproducible in staging?: yes Reproducible in production?: yes

View all open jobs on GitHub

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 25 (20 by maintainers)

Most upvoted comments

Thanks @MitchExpensify – I think since @kidroca is working on this he’ll just bill us hourly. Feel free to correct me if I’m wrong @kidroca

Yes, I’ll add the work here under the hourly contract, it’s more convenient

(💲 Don’t tempt me by doubling the price 💲)

@roryabraham when I worked on the “2-package” structure I needed to check logs, but couldn’t find anything under ~/Library/Logs/new.expensify/main.log

I assumed I was probably doing something incorrectly because I could find no logs there

But now that I saw this issue, it might be due to console.log statements being dropped from the main.js code, since it’s bundled by webpack (with mode: production) and this would remove console.log statempets

We should probably override that for Desktop main if we want console.log statements to remain

@roryabraham

@kidroca let me know if you want this assigned to you. Otherwise @MitchExpensify let’s double this

Yes, sounds good, I can post a small webpack config patch to preserve console statements for the main electron process

Thanks for you help with this @kidroca ! I see you’ve added it to your hourly contract so we’re all good here

Sure @kidroca, happy to review PRs for all of those things. Thanks!

Can you verify you have newer logs in - ~/Library/Logs/new.expensify.desktop (vs ~/Library/Logs/new.expensify)

Yes! I’ve got them there

Do we want to override that location or set a different name for the package?

Nope, let’s just update the documentation with the new location here and here and maybe add something to the README in the desktop folder about the log file. Thanks!

Cool, thanks @kidroca. Full-disclosure: I’m pretty swamped this week so it might take me a few days to get to the PR. I’ll do my best to review it as soon as I can

I think I’ll be ready with a PR tomorrow or the day after

@mananjadhav Going to unassign you on this one because it sounds like @kidroca’s got this. The fix should be pretty easy to validate.