# Log Management

Logs are an important part of monitoring a server as it allows you to know what has been happening. LinuxGSM has a log directory that allows you to track the gameserver, console and LinuxGSM itself.

If your user is `gameserver`, then LinuxGSM logs are located in the following directory:

`/home/gameserver/log`

This "log" directory contains two other directories:

* `script`, logs LinuxGSM script activity
* `console`, logs gameserver `[console](../commands/console.md)` output
* `game`, is a redirect to the game server log files if available.

  **Settings**

You can alter these settings to change LinuxGSM behavior:

```bash
logdays="7" # How long logs are kept
consolelogging="on" # Turning this to off will disable console logging
```

*Note:* `logdays="0"` *means logs will be removed if older than 24h.*

## Log clearing

LinuxGSM clears outdated logs according to `logdays` variable setting. This will affect `script` and `console` logs, as well as common game logs.

### Gamelogs management

LinuxGSM also clears logs from common locations to prevent them from using gigabytes of disk space, including:

* `${systemdir}/logs`
* `${systemdir}/*/logs`
* `${systemdir}/addons/sourcemod/logs`
* `${systemdir}/data/darkrp_logs`
* `${systemdir}/data/ulx_logs`

*Note:* `${systemdir}` *designates the location of your game server installation*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.linuxgsm.com/features/logging.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
