Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

logging event is does not work #75

Open
vnikopol opened this issue Aug 29, 2018 · 1 comment
Open

logging event is does not work #75

vnikopol opened this issue Aug 29, 2018 · 1 comment

Comments

@vnikopol
Copy link

vnikopol commented Aug 29, 2018

If i use Logging event, I get an error "The application called an interface that was marshalled for a different thread". I looked at the code, and

private void OnLog(LogLevel level, string message) ... Logging?.Invoke(
....
perhaps need to use Dispatcher.RunAsync(()

@v01d21
Copy link

v01d21 commented Sep 17, 2018

Hi vnikopol, you are right, please try this.
Dispatcher.RunAsync(DispatcherPriority.Normal, () => OnLog(LogLevel.Debug, "It works!"));

I hope it would be useful to you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants