@@ -166,8 +166,10 @@ function main($request, $compiler_config)
166
166
167
167
$ log_content = (($ compiler_config ['logging ' ] === true ) ? @file_get_contents ($ compiler_config ['logFileName ' ]) : "" );
168
168
if ($ compiler_config ['logging ' ] === true ){
169
- if ($ log_content !== false )
169
+ if ($ log_content !== false ) {
170
170
$ ret ["log " ] = $ log_content ;
171
+ file_put_contents ($ compiler_config ["compiler_dir " ] . "/log " , $ log_content );
172
+ }
171
173
else
172
174
return array_merge (array ("success " => "false " , "message " => "Failed to access logfile. " ), ($ ARCHIVE_OPTION ===true ) ? array ("archive " => $ ARCHIVE_PATH ) : array ());
173
175
}
@@ -280,6 +282,7 @@ function main($request, $compiler_config)
280
282
if ($ compiler_config ['logging ' ] === true ){
281
283
if ($ log_content !== false ){
282
284
$ ret ["log " ] = $ log_content ;
285
+ file_put_contents ($ compiler_config ["compiler_dir " ] . "/log " , $ log_content );
283
286
}
284
287
else
285
288
return array_merge (array ("success " => "false " , "message " => "Failed to access logfile. " ), ($ ARCHIVE_OPTION ===true ) ? array ("archive " => $ ARCHIVE_PATH ) : array ());
@@ -326,8 +329,10 @@ function main($request, $compiler_config)
326
329
327
330
$ log_content = (($ compiler_config ['logging ' ] === true ) ? @file_get_contents ($ compiler_config ['logFileName ' ]) : "" );
328
331
if ($ compiler_config ['logging ' ] === true ){
329
- if ($ log_content !== false )
332
+ if ($ log_content !== false ) {
330
333
$ ret ["log " ] = $ log_content ;
334
+ file_put_contents ($ compiler_config ["compiler_dir " ] . "/log " , $ log_content );
335
+ }
331
336
else
332
337
return array_merge (array ("success " => "false " , "message " => "Failed to access logfile. " ), ($ ARCHIVE_OPTION ===true ) ? array ("archive " => $ ARCHIVE_PATH ) : array ());
333
338
}
@@ -369,8 +374,10 @@ function main($request, $compiler_config)
369
374
$ log_content = @file_get_contents ($ compiler_config ['logFileName ' ]);
370
375
if (!$ log_content )
371
376
return array ("success " => "false " , "message " => "Failed to access logfile. " , "archive " => $ ARCHIVE_PATH );
372
- else
377
+ else {
378
+ file_put_contents ($ compiler_config ["compiler_dir " ] . "/log " , $ log_content );
373
379
return array_merge ($ returner , array ("log " => $ log_content ));
380
+ }
374
381
}
375
382
}
376
383
@@ -390,8 +397,10 @@ function main($request, $compiler_config)
390
397
$ log_content = @file_get_contents ($ compiler_config ['logFileName ' ]);
391
398
if (!$ log_content )
392
399
return array_merge (array ("success " => "false " , "message " => "Failed to access logfile. " ), ($ ARCHIVE_OPTION ===true ) ? array ("archive " => $ ARCHIVE_PATH ) : array ());
393
- else
400
+ else {
401
+ file_put_contents ($ compiler_config ["compiler_dir " ] . "/log " , $ log_content );
394
402
return array_merge ($ tmp , array ("log " => $ log_content ), ($ ARCHIVE_OPTION ===true ) ? array ("archive " => $ ARCHIVE_PATH ) : array ());
403
+ }
395
404
}
396
405
397
406
}
0 commit comments