mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-27 00:49:39 +00:00
[#14021] Add goerli geth.log to logs archive on iOS
This commit is contained in:
parent
081f1a2115
commit
8dd75205f3
@ -164,16 +164,27 @@ RCT_EXPORT_METHOD(sendLogs:(NSString *)dbJson
|
|||||||
NSString *networkDirPath = @"ethereum/mainnet_rpc";
|
NSString *networkDirPath = @"ethereum/mainnet_rpc";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
NSString *goerliNetworkDirPath = @"ethereum/goerli_rpc_dev";
|
||||||
|
#else
|
||||||
|
NSString *goerliNetworkDirPath = @"ethereum/goerli_rpc";
|
||||||
|
#endif
|
||||||
|
|
||||||
NSURL *networkDir = [rootUrl URLByAppendingPathComponent:networkDirPath];
|
NSURL *networkDir = [rootUrl URLByAppendingPathComponent:networkDirPath];
|
||||||
NSURL *originalGethLogsFile = [networkDir URLByAppendingPathComponent:@"geth.log"];
|
NSURL *originalGethLogsFile = [networkDir URLByAppendingPathComponent:@"geth.log"];
|
||||||
NSURL *gethLogsFile = [logsFolderName URLByAppendingPathComponent:@"geth.log"];
|
NSURL *gethLogsFile = [logsFolderName URLByAppendingPathComponent:@"geth.log"];
|
||||||
|
|
||||||
|
NSURL *goerliNetworkDir = [rootUrl URLByAppendingPathComponent:goerliNetworkDirPath];
|
||||||
|
NSURL *goerliGethLogsFile = [goerliNetworkDir URLByAppendingPathComponent:@"geth.log"];
|
||||||
|
NSURL *goerliLogsFile = [logsFolderName URLByAppendingPathComponent:@"goerli_geth.log"];
|
||||||
|
|
||||||
[dbJson writeToFile:dbFile.path atomically:YES encoding:NSUTF8StringEncoding error:nil];
|
[dbJson writeToFile:dbFile.path atomically:YES encoding:NSUTF8StringEncoding error:nil];
|
||||||
[jsLogs writeToFile:jsLogsFile.path atomically:YES encoding:NSUTF8StringEncoding error:nil];
|
[jsLogs writeToFile:jsLogsFile.path atomically:YES encoding:NSUTF8StringEncoding error:nil];
|
||||||
|
|
||||||
//NSString* gethLogs = StatusgoExportNodeLogs();
|
//NSString* gethLogs = StatusgoExportNodeLogs();
|
||||||
//[gethLogs writeToFile:gethLogsFile.path atomically:YES encoding:NSUTF8StringEncoding error:nil];
|
//[gethLogs writeToFile:gethLogsFile.path atomically:YES encoding:NSUTF8StringEncoding error:nil];
|
||||||
[fileManager copyItemAtPath:originalGethLogsFile.path toPath:gethLogsFile.path error:nil];
|
[fileManager copyItemAtPath:originalGethLogsFile.path toPath:gethLogsFile.path error:nil];
|
||||||
|
[fileManager copyItemAtPath:goerliGethLogsFile.path toPath:goerliLogsFile.path error:nil];
|
||||||
|
|
||||||
[SSZipArchive createZipFileAtPath:zipFile.path withContentsOfDirectory:logsFolderName.path];
|
[SSZipArchive createZipFileAtPath:zipFile.path withContentsOfDirectory:logsFolderName.path];
|
||||||
[fileManager removeItemAtPath:logsFolderName.path error:nil];
|
[fileManager removeItemAtPath:logsFolderName.path error:nil];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user