Open dermatz opened 1 month ago
frontend
and update file imports.gitignore
to exclude logs# Function to log error messages with timestamps
# Parameters:
# $1: Error message
function logError() {
local LOG_FILE=".ddev/commands/web/woodoo/logs/error.log"
local TIMESTAMP=$(date +"%Y-%m-%d %H:%M:%S")
echo "[${TIMESTAMP}] ERROR: $1" >> "${LOG_FILE}"
}
# Example usage of logError function
if [[ ! -d "${DDEV_COMPOSER_ROOT}/node_modules" ]]; then
logError "node_modules folder not found at ${DDEV_COMPOSER_ROOT}/node_modules"
echo -e "${txtred}${ICON_ERROR} node_modules folder not found. Please check the path: ${DDEV_COMPOSER_ROOT}/node_modules ${txtrst}"
fi
Add detailed logging options to better monitor the build process and diagnose errors more easily.