harbor run -t openthoughts/tasktrove-exp-rpt-stack-bash-withtests-gpt5mini-v2-stack-bash-withtests-gpt4o-7151harbor download openthoughts/tasktrove-exp-rpt-stack-bash-withtests-gpt5mini-v2-stack-bash-withtests-gpt4o-7151Implement a small command-line logging utility in Bash and place it at /app/logtool (executable). This utility will be used by automated tests, so follow the interface and behaviors below.
What to build
Required subcommands and behavior
Other details and requirements
File location and naming
Examples (behavioral examples — implement the behavior, not these exact tests)
Deliverable
The following test script will be used to verify your solution:
#!/bin/bash
current_dir=$(dirname "${BASH_SOURCE[0]}" )
source "${current_dir}/lib/init.sh"
source "${current_dir}/lib/util/logs.sh"
for test in $( find "${current_dir}/testing" -type f -name 'test-*.sh' | sort); do
os::log::info "==============================================================="
os::log::info "running e2e $test "
os::log::info "==============================================================="
if "${test}" ; then
os::log::info "==========================================================="
os::log::info "e2e $test succeeded at $( date )"
os::log::info "==========================================================="
else
os::log::error "============= FAILED FAILED ============= "
os::log::error "e2e $test failed at $( date )"
os::log::error "============= FAILED FAILED ============= "
failed="true"
fi
done
get_logging_pod_logs
if [[ -n "${failed:-}" ]]; then
exit 1
fi