How to Enable Chia Logs on Windows

Photo by Vlada Karpovich on Pexels.com

The Chia Client comes with its own debug logger, but it isn’t activated by default. There is a configuration value to set in order to activate increased logging capabilities. Doing this is useful because if you ever need to troubleshoot something, you have somewhere to look at. Activating this is very simple.

Open the following file in notepad:

C:\Users\<yourusername>\.chia\mainnet\config\config.yaml

Replace <yourusername> with your windows username. This is the configuration file for the Chia Client. Only modify the setting listed below. If you modify other things, it could cause instability in the program. Find the setting below and change it to “INFO”.

log_level = INFO

Once this is done, you need to restart the chia client. Since you are shutting the Chia Client down, take the opportunity to:

  1. Install Windows updates
  2. Install Chia Client updates
  3. Install any other updates and reboot the system.

Once the Chia Client is up and running again, open the file below in order to see all of the additional log information

C:\Users\<yourusername>\.chia\mainnet\log\debug.log

That’s it. This file will now log all information related to the behind the scenes with the Chia Client. This log rolls over so you will see .log.1, .log.2, .log.3, etc. Each of these are just older logs while the most current is named “debug.log”.

I hope this helps you on your Chia Journey

11 thoughts on “How to Enable Chia Logs on Windows

  1. Hi Alex

    please can you post on the basics and tips of using the log. Also where can I get info on CPU% load for each, time to complete a phase and plot times etc

    1. Hi Farming, You want the log so that you can look for issues. With the log open, use Find to look for WARNING or ERROR messages. Task Manager can tell you about the CPU utilization for each process. Just switch it to the advanced view.

  2. Hi Alex! Thank you so much for your posts and apologies if you’ve answered this elsewhere.

    Plotting in PowerShell doesn’t leave any plotting logs, is that something that can be switched on/off somewhere?

    I’m new to PS but familiar with Ubuntu’s CLI–I understand that I can transcribe the PS output to a file, would it suffice to just follow the file naming convention from:

    [string[]]$Path = (Get-ChildItem -Path $env:USERPROFILE\.chia\mainnet\plotter\ | sort CreationTime -Descending).FullName

    so that I can use the ChiaPlottingStatistic module? Is there anything I should be careful of? e.g., where to start the transcription?

    Any advice would be much appreciated!

    Thanks again,
    Matt.

    1. Hi Matt, Thanks for the comment. Yes, there are actually various ways to make PowerShell print to a log instead of the console. I’m not sure if your code will do what you need it to do because I’m not a PS whiz, haha. I’ve seen the tee command used before. I’ve been meaning to make this change myself so I will probably update my post when I come up with a good way.

      1. Hi Alex,

        Thanks for the reply! I’ve tried the following (in a loop over i parallel plots):

        Start-Process -FilePath powershell.exe -ArgumentList “chia.exe plots create -n $plotsperQueue -b $Buffer -r $Threads -t $tempDir -d $FinalDir | Tee-Object -FilePath $($LogPath)_$($i).log”

        This works well at producing a log, I tried running i = 2 parallel plots (with n = 1) and had some unrelated issues with the second, so no log was produced. One issue with the above code is that if n = 2, the logs for 2 plots will go into the one log, so it might be hard to parse with the ChiaPlottingStatistic module. I’ll have a think about how to parse a file like that, ideally I’d like the final log to be identical to the ones created by the GUI, with appropriate filenames etc.

        Best,
        Matt.

Comments are closed.

%d bloggers like this: