Disable geth.log in release builds. Fixes #4782
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
This commit is contained in:
parent
b40b042b67
commit
3b4d7eebc7
|
@ -5,7 +5,7 @@ MAINNET_WARNING_ENABLED=1
|
|||
OFFLINE_INBOX_ENABLED=1
|
||||
RPC_NETWORKS_ONLY=1
|
||||
LOG_LEVEL=info
|
||||
LOG_LEVEL_STATUS_GO=info
|
||||
LOG_LEVEL_STATUS_GO=
|
||||
QUEUE_MESSAGE_ENABLED=0
|
||||
RN_BRIDGE_THRESHOLD_WARNINGS=0
|
||||
POW_TARGET=0.002
|
||||
|
|
|
@ -216,10 +216,10 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
|
|||
|
||||
JSONObject jsonConfig = new JSONObject(config);
|
||||
|
||||
String gethLogFilePath = prepareLogsFile();
|
||||
boolean logsEnabled = (gethLogFilePath != null) && !TextUtils.isEmpty(this.logLevel);
|
||||
String gethLogFilePath = TextUtils.isEmpty(this.logLevel) ? null : prepareLogsFile();
|
||||
boolean logsEnabled = (gethLogFilePath != null);
|
||||
|
||||
jsonConfig.put("LogEnabled", (gethLogFilePath != null && logsEnabled));
|
||||
jsonConfig.put("LogEnabled", logsEnabled);
|
||||
jsonConfig.put("LogFile", gethLogFilePath);
|
||||
jsonConfig.put("LogLevel", TextUtils.isEmpty(this.logLevel) ? "ERROR" : this.logLevel.toUpperCase());
|
||||
jsonConfig.put("DataDir", dataDir);
|
||||
|
|
|
@ -179,7 +179,7 @@ RCT_EXPORT_METHOD(startNode:(NSString *)configString) {
|
|||
NSURL *logUrl = [networkDirUrl URLByAppendingPathComponent:@"geth.log"];
|
||||
[resultingConfigJson setValue:newKeystoreUrl.path forKey:@"KeyStoreDir"];
|
||||
[resultingConfigJson setValue:[NSNumber numberWithBool:[logLevel length] != 0] forKey:@"LogEnabled"];
|
||||
[resultingConfigJson setValue:logUrl.path forKey:@"LogFile"];
|
||||
[resultingConfigJson setValue:([logLevel length] == 0 ? [NSNull null] : logUrl.path) forKey:@"LogFile"];
|
||||
[resultingConfigJson setValue:([logLevel length] == 0 ? [NSString stringWithUTF8String: "ERROR"] : logLevel) forKey:@"LogLevel"];
|
||||
|
||||
[resultingConfigJson setValue:[NSNumber numberWithBool:YES] forKeyPath:@"WhisperConfig.LightClient"];
|
||||
|
|
Loading…
Reference in New Issue