Feature load environment config#851
Feature load environment config#851erikzhang merged 11 commits intoneo-project:masterfrom Ashuaidehao:feature-load_environment_config
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.
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.
Sure,I've removed it.
vncoelho
left a comment
There was a problem hiding this comment.
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 .