-
Notifications
You must be signed in to change notification settings - Fork 16.4k
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
Using NLog #2783
Using NLog #2783
Conversation
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.
Looks good.
In future it could be more detailed log levels.
We can also rewrite LogForm to have better looking.
The quick test is passed. |
Yes, will be extracted when it does not exist. |
Consider move config file into temporary directory and/or always extract it. |
Form NLog official document:
Could also explicitly load from specific file. However, it is not encouraged "always extract" the NLog.config file because advanced user may added their own targets or rules with log level in the file. (Unless we have break change that require rewrite the NLog config.) For putting things in temp folder... Could not find a strong reason to argue why or why not do this. |
Question: Should we allow advanced user edit config: If we allow user edit config, then we can keep current behavior. |
shadowsocks-csharp/Data/NLog.config
Outdated
@@ -0,0 +1,12 @@ | |||
<?xml version="1.0" encoding="utf-8" ?> | |||
<!-- configuration may reset after shadowsocks upgrade --> |
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.
@studentmain here is the NLog config file. Allow user to modify some of the part but not encouraged. Once the code is merged, corresponding Wiki page would be created.
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.
Ok, if user broke the config, we can say "We warned you". It won't be problem now.
Please follow the guide below
You will be asked some questions, please read them carefully and answer honestly
Put an
x
into all the boxes [ ] relevant to your pull request (like that [x])Use Preview tab to see how your pull request will actually look like
Searched for similar pull requests
Compiled the code with Visual Studio
Require translation update
Require document update (readme.md, wikipage, etc)
What is the purpose of your pull request?
Description of your pull request and other information
Replace the current logger to NLog with nlog.config.
Now just using legacy
Verbose log
switch. In future it could be more detailed log levels.Main executable file size is about 2.66 MB.