CLI Options
SwiftlyS2 startup behavior can be configured with command-line options passed when launching the game server.
Startup Example
./game/bin/win64/cs2.exe -dedicated +map de_dust2 \
-sw_path addons/swiftlys2 \
-sw_logpath addons/swiftlys2/logs \
-sw_hide_logs_in_console 1 \
-sw_loglevel WARNINGOptions Reference
| Option | Example | Details |
|---|---|---|
-sw_path | -sw_path addons/swiftlys2 | Root directory of the SwiftlyS2 installation, relative to game/csgo: configs, gamedata, extensions, the .NET runtime, dumps and console logs are resolved from it. Default: addons/swiftlys2 (addons\swiftlys2 on Windows). |
-sw_logpath | -sw_logpath addons/swiftlys2/logs | Relative path where the managed (.NET) logger writes its log files, in a managed/ subdirectory. Default: addons/swiftlys2/logs (addons\swiftlys2\logs on Windows). |
-sw_hide_logs_in_console | -sw_hide_logs_in_console 1 | Hides managed plugin logs in console; they are still written to files. Accepted values: 1, TRUE, YES, case-insensitive. Any other value leaves the logs visible. |
-sw_loglevel | -sw_loglevel WARNING | Minimum log level for the core and managed (.NET) loggers; messages below it are dropped. Default: INFO. Accepted values: TRACE, DEBUG, INFO, WARNING, ERROR, CRITICAL, NONE. |
Notes
-sw_pathand-sw_logpathare relative to thegame/csgodirectory, and a trailing slash is added automatically.- Every occurrence of
addons/swiftlys2in-sw_logpathis replaced with the value of-sw_path, so the default log directory follows a custom-sw_path. A value that does not containaddons/swiftlys2is used as-is. -sw_logpathonly affects managed (.NET) log files. Console logs are always written tologs/console/inside the-sw_pathdirectory, andConsoleLoggerrotation only coverslogs/managed/there, so a custom-sw_logpathis not rotated. Managed log files are only written whencore.ConsoleLogger.ManagedEnableistrue- see Core Configuration.- Use
-sw_hide_logs_in_consolewhen you want plugin logs to remain in files but not in console output. Logs from theCoreandSharedcategories are still printed, and passing the option without one of the accepted values does not enable it. - Use
-sw_loglevelto reduce noise while preserving higher-severity logs, in console as well as in log files. Values are case-insensitive and unrecognized values fall back toINFO. The native logger accepts the full list above, while the managed (.NET) logger only understandsDEBUG,INFO,WARNING,ERRORandOFFand falls back toINFOfor anything else. - All four options are read once when the core loads.
-sw_loglevelsetsSWIFTLY_LOG_LEVELand-sw_hide_logs_in_consolesetsSWIFTLY_HIDE_LOG_IN_CONSOLE; when an option is not passed the variable is left untouched, so either can also be exported in the server environment instead. Passing the option overwrites an existing value.