Difference between revisions of "Tracefile"

From GnuCash
Jump to: navigation, search
(Trace file on OSX: New name for OSX, new environment variable.)
(Remove redundancy; parts overlapped with Logging)
Line 1: Line 1:
In the GnuCash application, all error messages during the program run are redirected into a ''trace file''. The content of this file is very important when reporting a bug, as well as a [[Stack Trace]] for bugs that crash the program.
+
;Error Messages: are usually during a GnuCash session collected in a ''trace file''. The content of this file is very important when reporting a bug.
 +
:;For Crashs of the Program: also a [[Stack Trace]] is desired.
  
At each program start, a new trace file will be written and all output during the program run will be appended to that file.
+
;At Each Program Start: a new trace file will be created and all configured output during the program run will be appended to that file. See [[Logging]] to fine tune the capabilities and save your settings in a configuration file.
 +
:;Linux and {{Mac}} users: want to save a copy ''before the next GnuCash start'' if the file contains relevant infos.
  
== Trace file on Windows ==
+
;Third party components: have their own log facilities. If you use [[AqBanking]], you might also wish to read about [[AqBanking#Debugging|AqBanking Debugging]].
 
+
[[Category:Log]]
On [[Windows]] these files are named <tt>gnucash.trace.ABCDEF</tt>, where the .ABCDEF suffix is changed randomly on each start of gnucash. They are usually located in the folder
 
* '''Windows XP''': <tt>C:\Documents and Settings\myname\Local Settings\Temp</tt>
 
* '''Vista''' and later: <tt>C:\Users\myname\AppData\Local\Temp</tt>
 
for a user named "myname".
 
 
 
Note that Windows Explorer hides the AppData directory, so after opening <tt>c:\Users\myname</tt> click in the path bar at the top and type "\AppData" and press return. The AppData folder will open and you can continue to navigate normally.
 
 
 
This location may change, if you set the Windows environment variables TMPDIR, TMP, or TEMP (in DOS mode, use the SET command).
 
 
 
Also, the folder name "Local Settings" might be named differently in your native language (e.g. in German "Anwendungsdaten"), and it might also be a "hidden system folder" which is shown only if you change the folder properties to "Not hide system files/folders" in your file manager, e.g. windows explorer.
 
 
 
If you experience crashes or unexpected behavior, check the latest of these files (or the one created when the problem started) and add all interesting-looking lines of that file to your error reports (e.g. in [[Bugzilla]]). Please include at least the lines with the keywords <tt>WARN</tt> (for warning) and <tt>CRIT</tt> (for critical warning).
 
 
 
== Trace file on Linux ==
 
  
 +
== Linux, *BSD etc. ==
 
On Linux, the most recent  <tt>gnucash.trace</tt> file is located in <tt>/tmp</tt>. Some BSD variants use <tt>/var/tmp</tt> instead. Rename or move it as you like to safeguard it against overwriting.
 
On Linux, the most recent  <tt>gnucash.trace</tt> file is located in <tt>/tmp</tt>. Some BSD variants use <tt>/var/tmp</tt> instead. Rename or move it as you like to safeguard it against overwriting.
  
== Trace file on MacOS ==
+
== {{Mac}} ==
 +
On {{Mac}}, Gnucash creates the tracefile, gnucash.trace, in the operating system's current temp folder, located in /var/folders. The rest of the path has the form yy/yy_lots_more_hex_characters/-Tmp-/gnucash.trace. Most systems have several of these, so the easiest thing to do is to open Terminal and run <syntaxhighlight lang="sh">
 +
find /var/folders -name gnucash.trace
 +
</syntaxhighlight> and it will print out the path for you.
  
On OSX, Gnucash creates the tracefile, gnucash.trace, in the operating system's current temp folder, located in /var/folders. The rest of the path has the form yy/yy_lots_more_hex_characters/-Tmp-/gnucash.trace. Most systems have several of these, so the easiest thing to do is to open Terminal and run
+
MacOS 10.13 (High Sierra) has added a convenience environment variable <tt>TMPDIR</tt> so if you have that or later you can easily find the tracefile with <tt>$TMPDIR/gnucash.trace</tt>
$ find /var/folders -name gnucash.trace
 
and it will print out the path for you.
 
  
MacOS 10.13 (High Sierra) has added a convenience environment variable <code>TMPDIR</code> so if you have that or later you can easily find the tracefile with
+
== Windows ==
  $TMPDIR/gnucash.trace
+
On [[Windows]] these files are named <tt>gnucash.trace.ABCDEF</tt>, where the .ABCDEF suffix is changed randomly on each start of gnucash. They are usually located in the folder
 +
:;Since Vista: <tt>C:\Users\myname\AppData\Local\Temp</tt>
 +
:;Windows XP: <tt>C:\Documents and Settings\myname\Local Settings\Temp</tt>
 +
:for a user named <q>myname</q>.  
  
== Trace File Adjustments ==
+
Note that Windows Explorer hides the <tt>AppData</tt> directory, so after opening <tt>c:\Users\myname</tt> click in the path bar at the top and type "\AppData" and press return. The AppData folder will open and you can continue to navigate normally.
  
Running
+
This location may change, if you set the Windows environment variables TMPDIR, TMP, or TEMP (in DOS mode, use the SET command).
gnucash --help
 
in a command shell will give you a clue of possible options:
 
*'''--debug''': Enable debugging mode: increasing logging to provide deep detail.
 
*'''--extra''': Enable extra/development/debugging features.
 
*'''--log''': Log level overrides, of the form "log.ger.path={debug,info,warn,crit,error}"
 
*'''--logto''': File to log into; defaults to "/tmp/gnucash.trace"; can be "stderr" or "stdout".
 
  
So, if <code>gnucash --debug</code> is not sufficient, <code>gnucash --debug --extra</code> might be.
+
Also, the folder name <tt>Local Settings</tt> might be named differently in your native language like in German <tt>Anwendungsdaten</tt>, and it might also be a ''hidden system folder'' which is shown only if you change the folder properties to <tt>Not hide system files/folders</tt> in your file manager like <tt>Windows Explorer</tt>.
  
Finally with <tt>--log</tt> you can fine tune the [[Logging]] capabilities and save your settings in the special file <tt>~/.gnucash/log.conf</tt>.
+
If you experience crashes or unexpected behavior, check the latest of these files (or the one created when the problem started) and add all interesting-looking lines of that file to your error reports (e.g. in [[Bugzilla]]). Please include at least the lines with the keywords <tt>WARN</tt> (for warning) and <tt>CRIT</tt> (for critical warning).
 
 
== See Also ==
 
 
 
Third party modules have their own log facilities. If you use [[AqBanking]], you might also wish to read about [[AqBanking#Debugging|AqBanking Debugging]].
 

Revision as of 11:11, 14 April 2021

Error Messages
are usually during a GnuCash session collected in a trace file. The content of this file is very important when reporting a bug.
For Crashs of the Program
also a Stack Trace is desired.
At Each Program Start
a new trace file will be created and all configured output during the program run will be appended to that file. See Logging to fine tune the capabilities and save your settings in a configuration file.
Linux and macOS users
want to save a copy before the next GnuCash start if the file contains relevant infos.
Third party components
have their own log facilities. If you use AqBanking, you might also wish to read about AqBanking Debugging.

Linux, *BSD etc.

On Linux, the most recent gnucash.trace file is located in /tmp. Some BSD variants use /var/tmp instead. Rename or move it as you like to safeguard it against overwriting.

macOS

On macOS, Gnucash creates the tracefile, gnucash.trace, in the operating system's current temp folder, located in /var/folders. The rest of the path has the form yy/yy_lots_more_hex_characters/-Tmp-/gnucash.trace. Most systems have several of these, so the easiest thing to do is to open Terminal and run
find /var/folders -name gnucash.trace
and it will print out the path for you.

MacOS 10.13 (High Sierra) has added a convenience environment variable TMPDIR so if you have that or later you can easily find the tracefile with $TMPDIR/gnucash.trace

Windows

On Windows these files are named gnucash.trace.ABCDEF, where the .ABCDEF suffix is changed randomly on each start of gnucash. They are usually located in the folder

Since Vista
C:\Users\myname\AppData\Local\Temp
Windows XP
C:\Documents and Settings\myname\Local Settings\Temp
for a user named myname.

Note that Windows Explorer hides the AppData directory, so after opening c:\Users\myname click in the path bar at the top and type "\AppData" and press return. The AppData folder will open and you can continue to navigate normally.

This location may change, if you set the Windows environment variables TMPDIR, TMP, or TEMP (in DOS mode, use the SET command).

Also, the folder name Local Settings might be named differently in your native language like in German Anwendungsdaten, and it might also be a hidden system folder which is shown only if you change the folder properties to Not hide system files/folders in your file manager like Windows Explorer.

If you experience crashes or unexpected behavior, check the latest of these files (or the one created when the problem started) and add all interesting-looking lines of that file to your error reports (e.g. in Bugzilla). Please include at least the lines with the keywords WARN (for warning) and CRIT (for critical warning).