Add DEBUG variable to control logging verbosity
This commit is contained in:
parent
2419f0741f
commit
d9bea07841
3 changed files with 25 additions and 2 deletions
|
@ -128,6 +128,14 @@ ds_workshop_changelevel $map_name
|
|||
|
||||
# Customizing this Container
|
||||
|
||||
## Debug Logging
|
||||
|
||||
If you want to increase the verbosity of log output set the `DEBUG` environment variable:
|
||||
|
||||
```dockerfile
|
||||
DEBUG=0 (0=none, 1=steamcmd, 2=cs2, 3=all)
|
||||
```
|
||||
|
||||
## Validating Game Files
|
||||
|
||||
If you break the game through your customisations and want steamcmd to validate and redownload then set the `STEAMAPPVALIDATE` environment variable to `1`:
|
||||
|
|
|
@ -1,17 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Debug
|
||||
|
||||
## Steamcmd debugging
|
||||
if [[ $DEBUG -eq 1 ]] || [[ $DEBUG -eq 3 ]]; then
|
||||
STEAMCMD_SPEW="+set_spew_level 4 4"
|
||||
fi
|
||||
## CS2 server debugging
|
||||
if [[ $DEBUG -eq 2 ]] || [[ $DEBUG -eq 3 ]]; then
|
||||
CS2_LOG="on"
|
||||
CS2_LOG_MONEY=1
|
||||
CS2_LOG_DETAIL=3
|
||||
CS2_LOG_ITEMS=1
|
||||
fi
|
||||
|
||||
# Create App Dir
|
||||
mkdir -p "${STEAMAPPDIR}" || true
|
||||
|
||||
# Download Updates
|
||||
|
||||
if [[ "$STEAMAPPVALIDATE" -eq 1 ]]; then
|
||||
VALIDATE="validate"
|
||||
else
|
||||
VALIDATE=""
|
||||
fi
|
||||
|
||||
eval bash "${STEAMCMDDIR}/steamcmd.sh" +force_install_dir "${STEAMAPPDIR}" \
|
||||
eval bash "${STEAMCMDDIR}/steamcmd.sh" "${STEAMCMD_SPEW}"\
|
||||
+force_install_dir "${STEAMAPPDIR}" \
|
||||
+@bClientTryRequestManifestWithoutCode 1 \
|
||||
+login anonymous \
|
||||
+app_update "${STEAMAPPID}" "${VALIDATE}"\
|
||||
|
|
|
@ -5,6 +5,7 @@ services:
|
|||
environment:
|
||||
# Server configuration
|
||||
- SRCDS_TOKEN # Game Server Token from https://steamcommunity.com/dev/managegameservers
|
||||
- DEBUG=0 # (0 - off, 1 - steamcmd, 2 - cs2, 3 - all)
|
||||
- STEAMAPPVALIDATE=0 # (0 - no validation, 1 - enable validation)
|
||||
- CS2_SERVERNAME=changeme # (Set the visible name for your private server)
|
||||
- CS2_CHEATS=0 # (0 - disable cheats, 1 - enable cheats)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue