[READ-ME] How to locate the game logs

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Locked
User avatar
Development Team
Battle for Wesnoth
Location: Wesnoth.org
Contact:

[READ-ME] How to locate the game logs

Post by Development Team »

Windows

Launch Wesnoth and choose the Version Image button on the title screen. From there, you can either choose the Open Log File option to view the current session's log in Notepad, or click on the folder icon next to the User Data box to launch Windows Explorer, and then browse to the logs subfolder. Wesnoth keeps the last 9 log files and automatically deletes older ones on startup.

If you cannot launch Wesnoth for some reason, see the instructions on the wiki for determining the location of your user data folder and the logs subfolder.


Linux and macOS using Steam

Right-click on Wesnoth in your game library on Steam, choose PropertiesGeneralSet Launch Options, enter %COMMAND% 2> ~/wesnoth.log, and choose OK. This will cause Wesnoth’s console output to be logged to the wesnoth.log file in your home folder — the file will be replaced on every subsequent launch. Alternatively, you can use 2>> instead of 2> to append to the file instead.


macOS (standalone)

Right-click or Control-click the Wesnoth app, choose Show Package Contents, browse to Contents/MacOS, and open “Wesnoth”. This will start Wesnoth on a terminal emulator without having to type anything into a command line.

Alternatively, open your preferred terminal emulator and type:

Code: Select all

cd /Applications/Wesnoth.app/Contents/MacOS/
./Wesnoth
Then you can use the same output redirection techniques outlined below for Unix-like operating systems.


Linux/other Unix-like OS (standalone)

In order to obtain the game's log output you will need to launch it from the command line on a terminal emulator (e.g. Terminal, Konsole, xterm), for example, by running wesnoth or wesnoth-1.14 depending on the version and how it was packaged for your platform.

You can optionally redirect it to a text file like this:

Code: Select all

# Replaces an existing file is there is one
wesnoth > your_text_file_here.txt 2>&1

# Appends to an existing file if there is one
wesnoth >> your_text_file_here.txt 2>&1
You can also redirect it to a text file and display it on the terminal emulator at the same time:

Code: Select all

# Replaces an existing file if there is one
wesnoth 2>&1 | tee your_text_file_here.txt

# Appends to an existing file if there is one
wesnoth 2>&1 | tee -a your_text_file_here.txt
Locked