User:Oldman/A layman's guide/How to use log2lines

From ReactOS Wiki
< User:Oldman‎ | A layman's guide
Revision as of 15:20, 10 January 2019 by Oldman (talk | contribs) (Created page with " In this tutorial there is also a Unix based subsection. You have created a Jira Issue for a bug, you are then asked to translate the addresses in the backtrace that are in t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In this tutorial there is also a Unix based subsection.

You have created a Jira Issue for a bug, you are then asked to translate the addresses in the backtrace that are in the debug log.

To do this you will need log2lines, which comes with RosBE, if you haven't already got RosBE, then it can be down-loaded from Sourceforge

Before you down-load RosBE, create some folders on whatever drive you like and call them whatever you like. In my example, I have created a master folder on drive D:, which I have called DebugWork, this will contain all the files and folders.

You will also need to have 7zip installed; Peazip will not work.


D:\DebugWork (this is the master folder, all the other folders and files are stored in this).

D:\DebugWork\RosBE (install RosBE into this folder, but if you already have RosBE elsewhere, you will not need this).

Put the debug log and the iso into the folder D:\DebugWork (in my example they are explorer-0.4.7-dev-557-g57cda5a.log and reactos-bootcd-0.4.7-dev-557-g57cda5a-x86-gcc-lin-dbg.iso).

Using the example from above, you would type this at the RosBE command prompt:

D:\DebugWork\RosBE>log2lines -m -d D:\DebugWork\reactos-bootcd-0.4.7-dev-557-g57cda5a-x86-gcc-lin-dbg.iso <D:\DebugWork\explorer-0.4.7-dev-557-g57cda5a.log> D:\DebugWork\explorer-0.4.7-dev-557-g57cda5a-new.log


D:\DebugWork\RosBE> ................................ The RosBE command prompt (which shows the directory of RosBE).

log2lines -m -d ................................................ The command to start log2lines with two optional run-time commands.

The command -m puts a * at the front of the translated line, and the command -d indicates that it is a directory or iso image.

D:\DebugWork\reactos-bootcd-0.4.7-dev-557-g57cda5a-x86-gcc-lin-dbg.iso ....... The iso's directory path and name.

<D:\DebugWork\explorer-0.4.7-dev-557-g57cda5a.log> ........ The debug log's directory path and name (you must include < at the front and > at the back).

D:\DebugWork\explorer-0.4.7-dev-557-g57cda5a-new.log ... The directory where the new translated log will be written, with it's name.

If you have RosBE already installed elsewhere, then, using the same folder and files as in the example above, you would just start RosBE and at the command prompt, type: log2lines -m -d D:\DebugWork\reactos-bootcd-0.4.7-dev-557-g57cda5a-x86-gcc-lin-dbg.iso <D:\DebugWork\explorer-0.4.7-dev-557-g57cda5a.log> D:\DebugWork\explorer-0.4.7-dev-557-g57cda5a-new.log

log2lines - Screenshots

log2lines - Unix subsection

To be able to use log2lines in the Unix version of RosBE, you will have to compile the source code first, then you will find log2lines in the /reactos/host-tools/ folder. To use my example, it will be in /home/RosBuild/compiled/reactos/host-tools/.

See the Layman's guide - How to compile ReactOS - Unix subsection, for instructions on how to install RosBE-Unix.

The log2lines command is in this format: log2lines options ISO <old log> new log


log2lines ........ Executes log2lines.

options .......... Optional run-time commands for log2lines. -m Marks the translated line with an * and -d is for directory.

ISO .................. This is the name and location of the ISO image that you used.

<old log> ........ This is the location and name of the original debug log.

new log .......... This is the location and name for the modified debug log. It will be written with that name and at that location.

See also the explanation in the main section above.

For the following example, there will be two extra folders in the /home/RosBuild directory, one called debug-logs, where the debug logs are kept and the other called ISO-images, where the ISO image files are kept. The debug log that will be run through log2lines, is called SteamError2.log.


Start RosBE and at the command prompt, type:

/home/RosBuild/compiled/reactos/host-tools/log2lines -m -d /home/RosBuild/ISO-images/bootcd-75458-dbg.iso </home/RosBuild/debug-logs/SteamError2.log> /home/RosBuild/debug-logs/SteamError2-new.log

NOTE: For log2lines to work, you must give the full path to the host-tools directory. If you get any error message, for example log2lines: command not found, then check that your paths are all correct.

Layman's guides