Skip to content

Can't read any log files under Mac OS #898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
yankun opened this issue Jan 3, 2024 · 1 comment
Open

Can't read any log files under Mac OS #898

yankun opened this issue Jan 3, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@yankun
Copy link

yankun commented Jan 3, 2024

Hi,

I've checked out the repository, build it for Mac OS and tried to open a VERY simple log file. Unfortunately I'm getting an error message when dropping the file onto the Application Window:

Screenshot 2024-01-03 at 10 01 22

The log file is very basic:

tinylog.log

I'm trying to run the App on a M3 MacBook Pro. Can anybody reproduce this under a different operating system?

@yankun yankun added the bug Something isn't working label Jan 3, 2024
@Bigfellahull
Copy link

As a workaround, you can simply open the log file using the "Select a log file" button. This method works without any issues.

The problem with file dropping seems to occur when the application window is not in focus on Mac. After investigating, I found that modifying the following line in events.ts seems to resolve the issue:

// Original code
const currentWindow = webContents.getFocusedWebContents();

// Updated code
const currentWindow = event.sender;

This seems a more reliable way of detecting the window, at least on Mac. I haven't tested on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants