Skip to main content

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.

KeyTypeDefaultDescription
useMysqlBooleanfalseSet to true to use a MySQL/MariaDB database instead of SQLite.
mysqlHostString"localhost"The IP address or hostname of your MySQL server.
mysqlPortInteger3306The port your MySQL server is running on.
mysqlDatabaseString"database"The name of the database GriefLogger should use.
mysqlUsernameString"username"The username for the MySQL database connection.
mysqlPasswordString"password"The password for the MySQL database connection.
mysqlTimeoutInteger5000The connection timeout in milliseconds.
useIndexesBooleantrueCreates database indexes to significantly speed up lookup and inspection queries. It is highly recommended to keep this enabled.
info

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.

KeyTypeDefaultDescription
maxPageSizeInteger10The 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.

KeyTypeDefaultDescription
serverSideOnlyModeBooleantrueThis 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.

KeyTypeDefaultDescription
queueFrequencyInteger20How 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.

KeyTypeDefaultDescription
helloFrequencyInteger600How 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.