feat: enhance logging for character updates and voice cache management
This commit is contained in:
26
dev.sh
26
dev.sh
@@ -1,7 +1,27 @@
|
||||
#!/bin/bash
|
||||
trap 'kill 0' EXIT
|
||||
trap 'kill 0' EXIT INT TERM
|
||||
|
||||
(cd qwen3-tts-backend && DEV_MODE=true LOG_LEVEL=debug /home/bdim/miniconda3/envs/qwen3-tts/bin/uvicorn main:app --host 0.0.0.0 --port 8000 --reload --log-level debug 2>&1 | sed 's/^/[backend] /') &
|
||||
(cd qwen3-tts-frontend && npm run dev 2>&1 | sed 's/^/[frontend] /') &
|
||||
colorize() {
|
||||
local color="$1" name="$2"
|
||||
local R=$'\033[0m' DIM=$'\033[90m' YEL=$'\033[33m' RED=$'\033[31m'
|
||||
local prefix="${color}[${name}]${R} "
|
||||
while IFS= read -r line; do
|
||||
if [[ "$line" =~ ^DEBUG ]]; then
|
||||
printf '%s%s%s%s\n' "$prefix" "$DIM" "$line" "$R"
|
||||
elif [[ "$line" =~ ^WARNING ]]; then
|
||||
printf '%s%s%s%s\n' "$prefix" "$YEL" "$line" "$R"
|
||||
elif [[ "$line" =~ ^(ERROR|CRITICAL) ]]; then
|
||||
printf '%s%s%s%s\n' "$prefix" "$RED" "$line" "$R"
|
||||
else
|
||||
printf '%s%s\n' "$prefix" "$line"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
BLUE=$'\033[34m'
|
||||
MAGENTA=$'\033[35m'
|
||||
|
||||
(cd qwen3-tts-backend && DEV_MODE=true LOG_LEVEL=debug /home/bdim/miniconda3/envs/qwen3-tts/bin/uvicorn main:app --host 0.0.0.0 --port 8000 --reload --log-level debug 2>&1 | colorize "$BLUE" "backend") &
|
||||
(cd qwen3-tts-frontend && npm run dev 2>&1 | colorize "$MAGENTA" "frontend") &
|
||||
|
||||
wait
|
||||
|
||||
Reference in New Issue
Block a user