Skip to content

How to enable logging

Jerome Leclanche edited this page May 3, 2018 · 18 revisions

How to enable Logging in Hearthstone

Windows

Create a log.config file in one of the two following folders:

  • C:\Users\YOURUSER\AppData\Local\Blizzard\Hearthstone
  • %LOCALAPPDATA%/Blizzard/Hearthstone
Wine

See Windows section or:

  • Create a log.config in the folder WINEPREFIX/drive_c/users/YOURUSER/Local Settings/Application Data/Blizzard/Hearthstone
macOS

Create a log.config file in the folder ~/Library/Preferences/Blizzard/Hearthstone

Android

The log.config file is contained in the folder /sdcard/Android/data/com.blizzard.wtcg.hearthstone/files. You will need a file manager and text editor to find it and write to it.

log.config contents

  • Put the following text in the file
[Power]
LogLevel=1
FilePrinting=true
ConsolePrinting=true
ScreenPrinting=false

You're DONE! Now you're all set forever. Relaunch Hearthstone if you had it open. The log file, called Power.log, containing all your data will be found in the Hearthstone installation directory:

  • Windows: C:\Program Files (x86)\Hearthstone\Logs\Power.log (or just Program Files for 32 bit people)
  • macOS: /Applications/Hearthstone/Logs/Power.log
  • Android: /sdcard/Android/data/com.blizzard.wtcg.hearthstone/files/Logs

There are many other log files, but Power.log is the one that contains everything that happens in the game. This information is detailed enough to create a game replay (Hearthstone Deck Tracker does this, for example). For more technical information, check HearthStone Game State Protocol.

The Power.log file will contain as many games as you play in a Hearthstone session. Every time you re-open Hearthstone, Power.log will be erased and started from scratch, so be careful to save what you need before doing that.

Reading Power.log programmatically

The Python HSLog library can read Power.log files and extract game state out of them: https://github.com/HearthSim/python-hslog

The full gamestate protocol is explained here: https://hearthsim.info/docs/gamestate-protocol/

Achievements.log: Log card pack openings

Unfortunately, Achievements.log no longer logs card pack openings.