From c129f72b91d7c6bd48a4e2d7e62da78d99c85ec2 Mon Sep 17 00:00:00 2001 From: phanes Date: Thu, 16 Feb 2023 03:06:32 -0500 Subject: [PATCH] log path fix --- src/lcpex/liblcpex.cpp | 10 +++++----- src/plan/Task.cpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lcpex/liblcpex.cpp b/src/lcpex/liblcpex.cpp index 4e9a8b7..27c2529 100644 --- a/src/lcpex/liblcpex.cpp +++ b/src/lcpex/liblcpex.cpp @@ -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; } diff --git a/src/plan/Task.cpp b/src/plan/Task.cpp index e81dc5a..108cb95 100644 --- a/src/plan/Task.cpp +++ b/src/plan/Task.cpp @@ -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 )