blob: bbbf168605d4ac5a6c80dc64505bae5a2272af4e [file] [log] [blame]
#!/bin/bash
#
# config: 123 20
# @brief: Collect host's logs
#
. ${DREPORT_INCLUDE}/functions
DESCRIPTION="Host logs"
LOGS_PATH="@LOG_OUTPUT_PATH@"
if [[ -d ${LOGS_PATH} ]]; then
# Flush currently collected messages
busctl --no-pager --verbose call \
xyz.openbmc_project.HostLogger /xyz/openbmc_project/HostLogger \
xyz.openbmc_project.HostLogger Flush
# Copy log directory
add_copy_file "${LOGS_PATH}" "${DESCRIPTION}"
fi