Skip to content
This repository has been archived by the owner on Feb 3, 2020. It is now read-only.

Commit

Permalink
libcpu log: redirect the stdout to file
Browse files Browse the repository at this point in the history
Signed-off-by: chaojixx <[email protected]>
  • Loading branch information
weizhou-chaojixx committed Jan 5, 2020
1 parent 01b472e commit edca32b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/s2e-kvm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ void S2EKVM::initLogLevel(void) {

const char *libcpu_log_file = getenv("LIBCPU_LOG_FILE");
if (libcpu_log_file) {
logfile = fopen(libcpu_log_file, "w");
//logfile = fopen(libcpu_log_file, "w");
logfile = freopen(libcpu_log_file, "w", stdout);
if (!logfile) {
printf("Could not open log file %s\n", libcpu_log_file);
exit(-1);
Expand Down

0 comments on commit edca32b

Please sign in to comment.