-
-
Notifications
You must be signed in to change notification settings - Fork 457
New API Function LogError #3408
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
Changes from 3 commits
6f0126d
1381248
835e409
53c1232
5e63738
7695a46
6c5bb7d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -1,12 +1,12 @@ | ||||
| using System.Diagnostics; | ||||
| using System.IO; | ||||
| using System.Runtime.CompilerServices; | ||||
| using System.Runtime.ExceptionServices; | ||||
| using Flow.Launcher.Infrastructure.UserSettings; | ||||
Jack251970 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
| using NLog; | ||||
| using NLog.Config; | ||||
| using NLog.Targets; | ||||
| using Flow.Launcher.Infrastructure.UserSettings; | ||||
| using NLog.Targets.Wrappers; | ||||
| using System.Runtime.ExceptionServices; | ||||
|
|
||||
| namespace Flow.Launcher.Infrastructure.Logger | ||||
| { | ||||
|
|
@@ -135,12 +135,14 @@ private static string CheckClassAndMessageAndReturnFullClassWithMethod(string cl | |||
| return className; | ||||
| } | ||||
|
|
||||
| #if !DEBUG | ||||
|
||||
| ExceptionInternal(prefix, unprefixed, e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's no need for this. It is ok for the debug version to contain extra symbol.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we alter the usage in log.cs we need to also tweak it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we alter the usage in log.cs we need to also tweak it here.
Could you please explain it further?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we alter the usage in log.cs we need to also tweak it here.
Could you please explain it further?
For example we adapt this change then delete the #if DEBUG else ... in the reference line you post, it will raise a compile error in DEBUG mode since compiler can't find this func.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well. just keep as it was
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with the
[CallerMemberName]syntax. Is that just apart of the typing of themethodNameparameter?How would this work for json-rpc plugins? Would they make a request like (this is a mockup, I don't remember the exact structure):
{ "method": "LogError", "params": ["plugin_name", "traceback/stacktrace", "name of method that the plugin was handling"] }Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No sure how to use it, I think we need to manually pass
methodName. Just ignore[CallMemberName]which should be used by csharp plugins only.And usage is the same as
LogInfoetc.