Logging - HeliosVirtualCockpit/Helios GitHub Wiki

Demo Video: https://youtu.be/xWqABe6hgBY

Logging is provided by the NLog library and configured via a file called NLog.config. This file can be hacked by adventurous/technical users to adjust the exact logging being done, or you might be asked to change it by a Helios developer working on a bug you reported.

In terms of its behavior, logs are still written to Control Center.log and Profile Editor.log in the Documents\Helios folder, as in previous versions. However, additional files are created as follows:

Control Center Problems.log

If this file exists, then there were warning or errors reported by Helios Control Center. You should probably look into it and see what is going on. Sometimes these are just issues with a profile not finding its images or something else harmless, but sometimes these could indicate real problems.

Profile Editor Problems.log

If this file exists, then there were warning or errors reported by Helios Profile Editor. You should probably look into it and see what is going on. Sometimes these are just issues with a profile not finding its images or something else harmless, but sometimes these could indicate real problems.

HeliosPatching Problems.log

If this file exists, then the HeliosPatching.exe utility failed to run as administrator in order to apply or revert viewport patches. This always indicates a bug, so you should file a bug report and attach this file.

Log Archive

This folder will appear in the Documents\Helios folder and contains all log files that are not the current one. Every time you run Control Center or Profile Editor, the current log file will be archived and a new one started. This means that any messages in the normal log files is from this session, or the last session that had problems in the case of the *Problems.log files.

Archived logs are kept for 7 days (up to 30 files) and then automatically deleted. This means you should report any bugs in this time frame, before you have run another 30 sessions or 7 days have elapsed, so you can still access the logs. Otherwise, find the related log file and save it somewhere for filing a bug later.

Log Features

Log files also have millisecond time stamps now so you can use them to get an idea of how long things took. Any status report items in the Control Center Console or Interface Status also have time stamps, so you may be asked for the log file that matches the time codes in any such report that you share. In that case, find the file that includes the given time code. Files include their date in the name and the time of day you can figure out from the last accessed time in Windows Explorer.

For profile developers, Bindings are now logged once. This means you can see if any bindings you created were actually fired without switching to debug logging. However, it won't log a second time during the same session, because that would crush performance and fill up the logs.

To switch to verbose debug logging, you can use the --loglevel command line argument on both Control Center and Profile Editor and specify Debug, Info, Warning, or Error. There is no setting for "None," so "Error" is the least you can log.

Lua exceptions are now only logged once per trigger. In previous versions, errors in bindings that use Lua scripting would stop Control Center from being responsive while it kept throwing exceptions and logging them. Such errors are now logged only once per binding, so profile developers can check "Control Center Problems.log" for any issues. All problems are fixed when this file does not get created any more.

When bindings are logged, the entire paths to the source and target of the binding are now logged. This makes is much easier to locate the control(s) and interface(s) involved.

Unhandled exceptions in the product no longer silently exit but instead get logged with a stack trace and an message box is presented asking the user to file a bug. If you are the user and see such a dialog box, please file a bug and include the "* Problems.log" file or files. If no problems logs are created due to a bug, then please screen shot the dialog box showing the exception thrown.