Server Command Arguments#

Name

Usage

Default

--config config file path

Select the configuration file. example

unsuitable

--test-mode

Start the server in test mode, for development and debugging only

false

--clear

Clear server cache and logs on startup

false

--maintaining

Enable maintenance mode, continuously send maintenance information

false

Configuration File Example#

Note that when there is a conflict between the configuration file and command line arguments, the command line arguments will override the configuration file parameters

Noto,the supported type of config file is various,including toml,json,json5,yaml,ini,etc.Please choose your familiar format

For flexible reuse of configuration files, multiple configuration files can be specified, with later ones overriding earlier ones in order. For example, if the first configuration file specifies port=80, and the second specified configuration file sets port=90, the later configuration option will override the previous one, while retaining other existing options

log#

The default log level is info, which can be configured through the OURCHAT_LOG environment variable. Supported levels are trace, debug, info, warn, error. Log files are stored in the log directory, with filenames based on timestamps.

Logs will be cleaned up periodically, with the cleanup interval set in auto_clean_duration. It can also be changed through console commands.

Testing Log#

When test_mode is enabled, logs will not be output to files, and the test level will be automatically adjusted to trace.When test_mode is enabled, logs will not be output to files, and the test level will be automatically adjusted to trace.