Configuration
GriefLogger's configuration allows you to manage its database connection, performance, and general settings.
Locating the Config File
After running the server with GriefLogger for the first time, a configuration file will be generated at:
config/grieflogger/grieflogger-server.yml
You can edit this file with any text editor. Remember to restart your server for any changes to take effect.
Configuration Options
Here are all the available options in grieflogger-server.yml
, organized by section.
Database
This section controls how GriefLogger connects to its database. By default, it uses a local SQLite database, which requires no setup. For larger servers, MySQL/MariaDB is recommended for better performance.
Key | Type | Default | Description |
---|---|---|---|
useMysql | Boolean | false | Set to true to use a MySQL/MariaDB database instead of SQLite. |
mysqlHost | String | "localhost" | The IP address or hostname of your MySQL server. |
mysqlPort | Integer | 3306 | The port your MySQL server is running on. |
mysqlDatabase | String | "database" | The name of the database GriefLogger should use. |
mysqlUsername | String | "username" | The username for the MySQL database connection. |
mysqlPassword | String | "password" | The password for the MySQL database connection. |
mysqlTimeout | Integer | 5000 | The connection timeout in milliseconds. |
useIndexes | Boolean | true | Creates database indexes to significantly speed up lookup and inspection queries. It is highly recommended to keep this enabled. |
When useMysql
is false
, GriefLogger will automatically create and use a database.db
file in the config/grieflogger/
directory. All other mysql*
settings are ignored in this case.
General
General settings for the mod.
Key | Type | Default | Description |
---|---|---|---|
maxPageSize | Integer | 10 | The maximum number of log entries to display on a single page when using the /gl lookup or /gl inspect commands. |
Server
Settings related to server-side behavior.
Key | Type | Default | Description |
---|---|---|---|
serverSideOnlyMode | Boolean | true | This mode ensures that all text components sent by the mod are processed server-side. It prevents issues for vanilla clients who do not have the mod installed. It is recommended to keep this enabled. |
Queue
Performance settings for the database query queue.
Key | Type | Default | Description |
---|---|---|---|
queueFrequency | Integer | 20 | How often (in ticks) the mod sends batches of logged data to the database. 20 ticks is equal to 1 second. Lowering this value writes to the database more frequently, which may impact performance. |
Hello
Settings for maintaining the database connection.
Key | Type | Default | Description |
---|---|---|---|
helloFrequency | Integer | 600 | How often (in ticks) a "hello" packet is sent to the database to keep the connection alive. This is primarily for preventing MySQL timeouts. 600 ticks is 30 seconds. |