<blockquote>
<p><strong>I have seen a suggestion to read the log ...</strong></p>
</blockquote>
<p>That is a good suggestion.</p>
<p>Normally it wouldn't be needed. The program should explain to the user when it is unable to do something. However if you have been deleting, renaming or moving it's data files, you are undermining it's foundations in a way that the program designers won't have anticipated - in these circumstances, a logfile is a good place to look to try to understand what the problem is.</p>
<p>For any program, not just bitcoin core, you can check for program options to increase the amount of information logged - for example there might be a debug option - often a <code>-d</code> or <code>-debug</code> command-line flag.</p>
<blockquote>
<p><strong>... but honestly I'm not sure what I'm looking for.</strong></p>
</blockquote>
<p>You are looking for anything that looks like a major error rather than routine activity. Mostly indicated by words like &quot;error&quot;, &quot;failed&quot;, &quot;unable&quot;, &quot;denied&quot; and so on.</p>
<p>You are also looking for messages relating the the action you took just before the unwanted behaviour occurred. In your example, you clicked &quot;Open wallet&quot; so you are looking for messages that contain the word &quot;wallet&quot; or &quot;file&quot; or &quot;open&quot;. In Bitcoin core you know the wallet is stored in a file named &quot;wallet.dat&quot; so that is a good thing to look for.</p>
<p>Most likely these messages are near the end of the log file, so that might be a good place to start looking.</p>
<p>If you find lines in the log file that look interesting, also look at nearby lines to get a sense of what the program is trying to do and what might be happening. If you post an extract of the log to a Q&amp;A website like this, include maybe ten or so lines either side of the ones that caught your attention. Don't include too much as no-one wants to read hundreds of lines. Don't post too little.</p>

CC BY-SA 4.0
2021-05-03T08:59:16.223Z
2021-05-03T09:05:29.400Z
2021-05-03T09:05:29.400Z
RedGrittyBrick
<p>About a week ago I was trying to reorganise my file structure with Bitcoin Core, I accidentally moved the file before listing it as a backup so when I opened Core, it didn't work.</p>
<p>I tried returning the files to the same location but that didn't work so I reinstalled it and tried to open my wallet but it would freeze up as soon as I would click the &quot;Open Wallet&quot; button. I then synced it up to date but the issue persists.</p>
<p>I have seen a suggestion to read the log but honestly I'm not sure what I'm looking for.</p>

<bitcoin-core><blockchain><error>
What to look for in Bitcoin-core logfile when something bad happens
Dan Martin
# What to look for in Bitcoin-core logfile when something bad happens

(Asked by: username_0 on 2021-05-03)

About a week ago I was trying to reorganise my file structure with Bitcoin Core, I accidentally moved the file before listing it as a backup so when I opened Core, it didn't work.

I tried returning the files to the same location but that didn't work so I reinstalled it and tried to open my wallet but it would freeze up as soon as I would click the "Open Wallet" button. I then synced it up to date but the issue persists.

I have seen a suggestion to read the log but honestly I'm not sure what I'm looking for.

**Tags:** bitcoin-core, blockchain, error


---

## 1 answers

### Answer by username_1 on 2021-05-03. Score: 1

> **I have seen a suggestion to read the log ...**

That is a good suggestion.

Normally it wouldn't be needed. The program should explain to the user when it is unable to do something. However if you have been deleting, renaming or moving it's data files, you are undermining it's foundations in a way that the program designers won't have anticipated - in these circumstances, a logfile is a good place to look to try to understand what the problem is.

For any program, not just bitcoin core, you can check for program options to increase the amount of information logged - for example there might be a debug option - often a `-d` or `-debug` command-line flag.

> **... but honestly I'm not sure what I'm looking for.**

You are looking for anything that looks like a major error rather than routine activity. Mostly indicated by words like "error", "failed", "unable", "denied" and so on.

You are also looking for messages relating the the action you took just before the unwanted behaviour occurred. In your example, you clicked "Open wallet" so you are looking for messages that contain the word "wallet" or "file" or "open". In Bitcoin core you know the wallet is stored in a file named "wallet.dat" so that is a good thing to look for.

Most likely these messages are near the end of the log file, so that might be a good place to start looking.

If you find lines in the log file that look interesting, also look at nearby lines to get a sense of what the program is trying to do and what might be happening. If you post an extract of the log to a Q&A website like this, include maybe ten or so lines either side of the ones that caught your attention. Don't include too much as no-one wants to read hundreds of lines. Don't post too little.


---

