blob: 8399f9f7d3b6f9627ec53f59ea3b2c694249ea81 [file] [log] [blame]
#!/bin/bash
#
# config: 123 20
# @brief: Collect host's logs
#
. ${DREPORT_INCLUDE}/functions
DESCRIPTION="Host logs"
LOGS_PATH="/var/lib/obmc/hostlogs"
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