[vbox-dev] Logging

Frank Mehnert frank.mehnert at oracle.com
Thu Mar 31 06:43:01 GMT 2011


On Thursday 31 March 2011 07:51:00 Vikram Kapoor wrote:
> What is the right way to enable logging for VirtualBox? I compiled VBox
> with LOG_ENABLED and VBOX_WITH_R0_LOGGING defined.
> Then I am running VirtualBox.exe with "VBOX_LOG=+all.f.l" and
> "VBOX_LOG_DEST=file=<file_path>" environement variables set.  The file does
> get created with a single logline in it but when I run a VM, no other
> messages are logged.

Logging is normally automatically enabled in debug builds. So if you compile
VirtualBox with

  export BUILD_TYPE=debug

then the resulting build will be able to create debug log files. However,
that build will also include a lot of assertions and additional code for
debugging which makes VirtualBox slow.

If you only want to enable logging then you have to add the following line
to LocalConfig.kmk in the root directory of the VirtualBox tree:


After doing so, you have to recompile the whole beast of course.
When running VirtualBox, make sure to do

  export VBOX_LOG=+all.e.l.f

-- the 'export' is important if you want to log the VBoxSVC server as well.
The log files are created in the current directory.

Kind regards,

ORACLE Deutschland B.V. & Co. KG   Dr.-Ing. Frank Mehnert
Werkstrasse 24                     Staff Engineer, VirtualBox
71384 Weinstadt, Germany           mailto:frank.mehnert at oracle.com

Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Rijnzathe 6, 3454PV De Meern, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20110331/99998c97/attachment.sig>

More information about the vbox-dev mailing list