VirtualBox

Opened 4 years ago

Last modified 4 years ago

#19137 new enhancement

Change log rotation scheme from VBox.log[.<number>] to VBox[.<number>].log

Reported by: Socratis Owned by:
Component: other Version: VirtualBox 6.0.14
Keywords: Cc:
Guest type: all Host type: all

Description

Current situation

Not sure why it first got implemented as is, but when there's a log rotation, the rotation algorithm calls for the ".<number>" to be appended to the "VBox.log" name, resulting in "VBox.log.1", "VBox.log.2", "VBox.log.3", or more, depending on your rotation settings:

VBoxManage setproperty loghistorycount

That naming scheme is not very helpful when trying to open/display the logs, because they have a ".<number>" extension, which could be anything, with the most common use that the file is a part of a multi-part archive (ZIP and RAR come to mind).

Proposed solution

  • Change the naming scheme/logic/altorithm from "VBox.log.<number>" to "VBox.<number>.log".

That way there are always "VBox[.<number>].log" files, which can be associated and opened with your favorite application.

NOTE
The same logic applies to the PNG screen-capture files in case of a Guru Meditation, should be addressed there as well.

Change History (1)

comment:1 by Frank Batschulat (Oracle), 4 years ago

Fwiw, I am also not a huge fan of the current log file naming schema. For the zones framework in Solaris we decided to use this schema:

zoneadm.<timestamp>.<zone>.<subcommand>

which could be translated to:

vbox.<timestamp>.<vm-name>[.<vm-operation>]

where timestamp is:

timestamp=$(TZ=GMT date +"%Y""%m""%dT""%H""%M""%"SZ)

and log rotation would add a rotational number to the very end.

Also typically, log ration is done by a system service, ie. logrotate(8) and a respective system service and not hand crafted by the shelscripts as in this case of VBOX.

adding a timestamp in would make sure we can match log files only to events.

getting rid of CamelCase would be a bonus too.

Just some immediate thoughts.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use