Spaces:
Running
Running
feat: add configurable logging levels and disable Bonjour discovery in start script
Browse files
start.sh
CHANGED
|
@@ -14,6 +14,12 @@ OPENCLAW_RUNTIME_VERSION=""
|
|
| 14 |
WHATSAPP_ENABLED="${WHATSAPP_ENABLED:-false}"
|
| 15 |
WHATSAPP_ENABLED_NORMALIZED=$(printf '%s' "$WHATSAPP_ENABLED" | tr '[:upper:]' '[:lower:]')
|
| 16 |
SYNC_INTERVAL="${SYNC_INTERVAL:-180}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
echo ""
|
| 18 |
echo " ββββββββββββββββββββββββββββββββββββββββββββ"
|
| 19 |
echo " β π¦ HuggingClaw Gateway β"
|
|
@@ -157,6 +163,11 @@ CONFIG_JSON=$(cat <<'CONFIGEOF'
|
|
| 157 |
"channels": {},
|
| 158 |
"plugins": {
|
| 159 |
"entries": {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 160 |
}
|
| 161 |
}
|
| 162 |
CONFIGEOF
|
|
@@ -167,6 +178,7 @@ CONFIG_JSON=$(echo "$CONFIG_JSON" | jq ".gateway.auth.token = \"$GATEWAY_TOKEN\"
|
|
| 167 |
|
| 168 |
# Model configuration at top level
|
| 169 |
CONFIG_JSON=$(echo "$CONFIG_JSON" | jq ".agents.defaults.model = \"$LLM_MODEL\"")
|
|
|
|
| 170 |
|
| 171 |
# Optional: dynamic custom OpenAI-compatible provider registration
|
| 172 |
CUSTOM_PROVIDER_NAME="${CUSTOM_PROVIDER_NAME:-}"
|
|
|
|
| 14 |
WHATSAPP_ENABLED="${WHATSAPP_ENABLED:-false}"
|
| 15 |
WHATSAPP_ENABLED_NORMALIZED=$(printf '%s' "$WHATSAPP_ENABLED" | tr '[:upper:]' '[:lower:]')
|
| 16 |
SYNC_INTERVAL="${SYNC_INTERVAL:-180}"
|
| 17 |
+
OPENCLAW_CONSOLE_LOG_LEVEL="${OPENCLAW_CONSOLE_LOG_LEVEL:-warn}"
|
| 18 |
+
OPENCLAW_FILE_LOG_LEVEL="${OPENCLAW_FILE_LOG_LEVEL:-info}"
|
| 19 |
+
OPENCLAW_CONSOLE_LOG_STYLE="${OPENCLAW_CONSOLE_LOG_STYLE:-compact}"
|
| 20 |
+
|
| 21 |
+
# HF Spaces does not benefit from Bonjour discovery, and the retries add noise.
|
| 22 |
+
export OPENCLAW_DISABLE_BONJOUR="${OPENCLAW_DISABLE_BONJOUR:-1}"
|
| 23 |
echo ""
|
| 24 |
echo " ββββββββββββββββββββββββββββββββββββββββββββ"
|
| 25 |
echo " β π¦ HuggingClaw Gateway β"
|
|
|
|
| 163 |
"channels": {},
|
| 164 |
"plugins": {
|
| 165 |
"entries": {}
|
| 166 |
+
},
|
| 167 |
+
"logging": {
|
| 168 |
+
"level": "info",
|
| 169 |
+
"consoleLevel": "warn",
|
| 170 |
+
"consoleStyle": "compact"
|
| 171 |
}
|
| 172 |
}
|
| 173 |
CONFIGEOF
|
|
|
|
| 178 |
|
| 179 |
# Model configuration at top level
|
| 180 |
CONFIG_JSON=$(echo "$CONFIG_JSON" | jq ".agents.defaults.model = \"$LLM_MODEL\"")
|
| 181 |
+
CONFIG_JSON=$(echo "$CONFIG_JSON" | jq ".logging.level = \"$OPENCLAW_FILE_LOG_LEVEL\" | .logging.consoleLevel = \"$OPENCLAW_CONSOLE_LOG_LEVEL\" | .logging.consoleStyle = \"$OPENCLAW_CONSOLE_LOG_STYLE\"")
|
| 182 |
|
| 183 |
# Optional: dynamic custom OpenAI-compatible provider registration
|
| 184 |
CUSTOM_PROVIDER_NAME="${CUSTOM_PROVIDER_NAME:-}"
|