-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Feature load environment config #851
Feature load environment config #851
Conversation
update 0311
Update 20190328
sync 20190401
Sync20190505
Sync20190610
Codecov Report
@@ Coverage Diff @@
## master #851 +/- ##
==========================================
+ Coverage 38.7% 38.73% +0.03%
==========================================
Files 176 176
Lines 12482 12489 +7
==========================================
+ Hits 4831 4838 +7
Misses 7651 7651
Continue to review full report at Codecov.
|
neo/Helper.cs
Outdated
{ | ||
var env = Environment.GetEnvironmentVariable("NEO_NETWORK"); | ||
var configFile = string.IsNullOrWhiteSpace(env) ? $"{config}.json" : $"{config}.{env}.json"; | ||
Plugin.Log(nameof(LoadConfig), LogLevel.Info, $"Config loading:{configFile}"); |
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 prefer to remove this line. Because this is a common method, this can cause the logs to become confusing. The caller should log by itself.
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.
Sure,I've removed it.
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.
Even protocol.json would be loadded like this, right?
Is this in connection with #845?
Can you provide more details about the design, @Ashuaidehao. I did not understand it very well.
@vncoelho ,it use a enviroment variable to control which config file should be used . It would be useful to use this feature load both "config.json" and "protocol.json" . |
load environmental config filles for NEO3 .