File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,7 @@ impl RedisCluster {
206
206
207
207
match process. try_wait ( ) {
208
208
Ok ( Some ( status) ) => {
209
+
209
210
let stdout = process. stdout . map_or ( String :: new ( ) , |mut out|{
210
211
let mut str = String :: new ( ) ;
211
212
out. read_to_string ( & mut str) . unwrap ( ) ;
@@ -219,7 +220,10 @@ impl RedisCluster {
219
220
let err =
220
221
format ! ( "redis server creation failed with status {status:?}.\n stdout: `{stdout}`.\n stderr: `{stderr}`" ) ;
221
222
if cur_attempts == max_attempts {
222
- panic ! ( "{err}" ) ;
223
+ let log_file_index = cmd. get_args ( ) . position ( |os_str| os_str == "--logfile" ) . unwrap ( ) + 1 ;
224
+ let log_file_path = cmd. get_args ( ) . skip ( log_file_index) . next ( ) . unwrap ( ) ;
225
+ let contents = std:: fs:: read_to_string ( log_file_path) . unwrap ( ) ;
226
+ panic ! ( "{err} - logfile: {contents}" ) ;
223
227
}
224
228
eprintln ! ( "Retrying: {err}" ) ;
225
229
cur_attempts += 1 ;
You can’t perform that action at this time.
0 commit comments