Whaaaaaaat? An extension for logging an extension? That’s right! This is what this extension does in a nutshell:

It sits between Arma 3 and your original extension and logs in and out traffic as well as your extension execution times into a .csv file, which then can be loaded into Excel or other software for analysis. This is what is logged:

  • ORDER – the order number of the transaction
  • TIME – the date and time (UTC and up to seconds) of the transaction
  • METHOD – the .dll method called
  • DURATION – the execution time of the original extension in milliseconds
  • FUNCTION – the function param (see this page for reference)
  • ARGUMENTS – the arguments param (see this page for reference)
  • OUTPUT – the raw return string from extension
  • RESULT – the returned int result wherever applicable

The .csv file generated has 3 byte UTF-8 BOM written to it so that Excel can display multibyte strings with proper encoding. The file is generated in the following directory:

…My Documents/Arma 3/KK’s LogExtension/

The .csv file has shared permission for reading and is fully released only after extension is unloaded.

Getting Started

  • Download logExtension.zip and place both logExtension.dll and logExtension_x64.dll files into the folder where your extension is
  • Rename your extension by adding .original to its name. For example if your extension is named blahblah_x64.dll rename it to blahblah_x64.dll.original
  • Now rename the appropriate logExtensionXXX .dll file to your extension’s original name. From previous example: Rename logExtension_x64.dll to blahblah_x64.dll
  • Call your extension as usual and check the logs (see above for the location)

A little explanation of what is happening here. In order for Arma 3 to be able to call logExtension, it has to be renamed to take the name of your original extension. Then it will be looking for the extension with the same name with added suffix  .original and then it will channel through all calls from Arma 3 to that extension, while logging the traffic.

The actual routing is very fast, and the file writing is done in a separate thread, which will have no impact on the performance. However what takes time is the copying of in and out traffic, this is why it is not recommended to have logExtension sitting there in a permanent capacity. Use it to analyse the working of your extension and then remove it. To get things back to as before, remove all logExtension  .dlls from the directory, rename your original extension back, by removing the suffix .original

If you find it useful, please don’t forget to donate for the cause!


Current version v1.17
UPDATE 17/05/18:  Fixed bug with order counter
UPDATE 20/05/18:  Added a few missing declarations