log path fix

master
phanes 2023-02-16 03:06:32 -05:00
parent 7ed6e13fa5
commit c129f72b91
2 changed files with 7 additions and 7 deletions

View File

@ -130,23 +130,23 @@ void run_child_process(bool context_override, const char* context_user, const ch
case IDENTITY_CONTEXT_ERRORS::ERROR_NONE:
break;
case IDENTITY_CONTEXT_ERRORS::ERROR_NO_SUCH_USER:
std::cerr << "lcpex: Aborting: context user not found: " << context_user << std::endl;
std::cerr << "REX: Aborting: context user not found: " << context_user << std::endl;
exit(1);
break;
case IDENTITY_CONTEXT_ERRORS::ERROR_NO_SUCH_GROUP:
std::cerr << "lcpex: Aborting: context group not found: " << context_group << std::endl;
std::cerr << "REX: Aborting: context group not found: " << context_group << std::endl;
exit(1);
break;
case IDENTITY_CONTEXT_ERRORS::ERROR_SETGID_FAILED:
std::cerr << "lcpex: Aborting: Setting GID failed: " << context_user << "/" << context_group << std::endl;
std::cerr << "REX: Aborting: Setting GID failed: " << context_user << "/" << context_group << std::endl;
exit(1);
break;
case IDENTITY_CONTEXT_ERRORS::ERROR_SETUID_FAILED:
std::cerr << "lcpex: Aborting: Setting UID failed: " << context_user << "/" << context_group << std::endl;
std::cerr << "REX: Aborting: Setting UID failed: " << context_user << "/" << context_group << std::endl;
exit(1);
break;
default:
std::cerr << "lcpex: Aborting: Unknown error while setting identity context." << std::endl;
std::cerr << "REX: Aborting: Unknown error while setting identity context." << std::endl;
exit(1);
break;
}

View File

@ -418,8 +418,8 @@ void Task::execute( Conf * configuration )
throw TaskException("Could not prepare logs for task execution at '" + logs_root + "'.");
}
std::string stdout_log_file = logs_root + "/" + timestamp + ".stdout.log";
std::string stderr_log_file = logs_root + "/" + timestamp + ".stderr.log";
std::string stdout_log_file = logs_root + "/" + task_name + "/" + timestamp + ".stdout.log";
std::string stderr_log_file = logs_root + "/" + task_name + "/" + timestamp + ".stderr.log";
// check if working directory is to be set
if ( override_working_dir )