If you’ve spent some time reading through this blog, you may have seen many tables of statistics and timelines.  These were all gathered from game logs called Journal Files.  While there are many excellent community developed tools for Elite Dangerous, if you are serious about building a character narrative based on actual in game events then there will come a time when there is not a readily developed tool to get the information you are looking for.  Alternatively you may have chosen to not use a tool that forwards journal events to a remote service.

This article presents examples of how to parse the journal files for certain event types or scenarios. 
This applies to the PC Platform only.  
Note: if you launch Elite Dangerous via Steam then the path to your journal files may differ from the default location shown below.  

We’ll be making use of Windows Powershell command-line shell and scripting language, which is not as complicated as it sounds, however an introduction to Powershell is beyond the scope of this article.  If you’ve never used Powershell before, then fret not because the ‘standard approach’ section will get you started.

Assumptions

  • Elite Dangerous is installed on a Windows PC platform
  • Elite Dangerous is installed in the default location
  • The journal files are in the default location – C:\Users\$env:USERNAME\Saved Games\Frontier Developments\Elite Dangerous
  • The journal file naming convention is ‘Journal.YYMMDDHHMMSS.01.log’ where the timestamp is the start of the game session
  • The journal files have not been altered or changed in anyway
  • All historical journal files exist and old files have not been deleted
  • When running the Powershell commands, the current working directory is the journal files directory shown above

Standard Approach

  • Each query will be a single line using the Powershell pipeline.
  • Open a Powershell prompt using the Windows key + R, then typing powershell and pressing ENTER
    ⊞ + R
    type   powershell
    press  ENTER
  • In the Powershell terminal, change current working directory is the journal file default location shown above
    cd "C:\Users\$env:USERNAME\Saved Games\Frontier Developments\Elite Dangerous"
  • Read the content of all the Journal files:
    Get-ChildItem .\Journal.*.log | Get-Content
  • Filter the content of each file for a string of text (in this example the rank promotion event):
    Select-String -pattern '"event":"promotion"'
  • (Optional) apply a second filter for a string of text (in this example find the Empire major faction):
    Select-String -pattern "Empire"
  • Convert the entry from the native JSON data format to a Powershell data object
    ConvertFrom-Json

Selective Query

In some circumstances you may want to query a specific date range, which can be done easily by adapting the journal file read request 

  • Read the content of the Journal files for a specific year, in this example 2020:
    Get-ChildItem .\Journal.20*.log | Get-Content
  • Read the content of the Journal files for a specific month, in this example March 2019:
    Get-ChildItem .\Journal.1903*.log | Get-Content

Scenarios

Here is a collection of scenarios, or questions about events in my characters history, which have cropped up in the creation of this blog.  It’s not an exhaustive list of queries to apply to the journal files, but rather some examples which can be used as starting points and then adapted.  

Leave a comment below if there is a journal file query you would like to see added to this list.

Each number in the output is the numerical representation of a given rank.  See Wiki for details.

Command

Get-ChildItem .\Journal.*.log | Get-Content | Select-String -pattern '"event":"promotion"'| Select-String -pattern "Empire" | ConvertFrom-Json

Example Output

timestamp            event     Empire
---------            -----     ------
2018-05-03T01:12:30Z Promotion      1
2018-05-03T01:59:20Z Promotion      2
2018-05-03T02:11:49Z Promotion      3
2018-05-03T02:24:54Z Promotion      4
2018-05-03T02:36:54Z Promotion      5
2018-05-03T02:49:44Z Promotion      6
2018-05-03T03:00:00Z Promotion      7
2018-05-03T03:14:36Z Promotion      8
2018-05-03T03:24:31Z Promotion      9
2018-05-03T12:41:07Z Promotion     10
2018-05-03T13:12:35Z Promotion     11
2018-05-03T14:39:37Z Promotion     12
2018-05-22T00:57:39Z Promotion     13
2018-05-22T02:18:19Z Promotion     14

Each number in the output is the numerical representation of a given rank.  See Wiki for details.

Command

Get-ChildItem .\Journal.*.log | Get-Content | Select-String -pattern '"event":"promotion"'| Select-String -pattern "Federation" | ConvertFrom-Json

Example Output

timestamp            event     Federation
---------            -----     ----------
2017-09-11T15:32:07Z Promotion          6
2017-09-11T19:48:40Z Promotion          7
2017-09-19T00:03:21Z Promotion          8
2017-10-10T00:16:28Z Promotion          9
2017-10-11T17:14:53Z Promotion         10
2017-10-12T21:31:25Z Promotion         11
2017-10-16T17:04:40Z Promotion         12
2018-05-23T21:41:37Z Promotion         13
2018-05-25T20:29:14Z Promotion         14

Command

Get-ChildItem .\Journal.*.log | Get-Content | Select-String -pattern '"Type":"lowtemperaturediamond"' | Select-String -pattern '"event":"MarketSell"' | ConvertFrom-Json | Select-Object -property timestamp,Count,SellPrice,TotalSale | Format-Table

Example Output

timestamp            Count SellPrice TotalSale
---------            ----- --------- ---------
2017-10-30T17:49:04Z     6     55370    332220
2020-04-28T18:35:38Z    65    389335  25306775
2020-05-13T23:02:32Z   107    985940 105495580
2020-05-14T12:26:33Z    96   1649392 158341632
2020-05-16T23:31:45Z    19   1105842  21010998
2020-05-17T01:13:16Z   124    780903  96831972
2020-05-17T02:55:54Z    97   1074365 104213405
2020-05-18T10:16:50Z   226   1588815 359072190
2020-05-19T21:43:32Z   183   1220010 223261830
2020-05-20T00:52:29Z   241   1062591 256084431
2020-05-22T04:09:30Z   228   1115644 254366832
2020-05-23T15:54:37Z   203   1145928 232623384
2020-05-24T22:34:24Z   402   1130554 454482708

Command

Get-ChildItem .\Journal.*.log | Get-Content | Select-String -pattern '"event":"FSDJump"' | ConvertFrom-Json | Select-Object -property timestamp,StarSystem,JumpDist | Format-Table

Example Output

timestamp            StarSystem                  JumpDist
---------            ----------                  --------
2020-05-31T13:03:33Z Bleae Thaa MQ-E b0            70.186
2020-05-31T13:04:28Z Bleae Thaa TX-A b2-0          74.013
2020-05-31T13:05:31Z Bleae Thaa WY-Y b2-1          66.834
2020-05-31T13:06:25Z Bleae Thaa GF-Z d16           73.490
2020-05-31T13:07:35Z Bleae Thaa KX-S b5-0          74.215
2020-05-31T13:08:29Z Bleae Thaa UZ-O b7-1          74.053
2020-05-31T13:09:38Z Bleae Thaa BH-L b9-2          70.410
2020-05-31T13:10:35Z Bleae Thaa LJ-H b11-1         72.827
2020-05-31T13:11:36Z Bleae Thaa OK-F b12-1         73.979
2020-05-31T13:12:36Z Bleae Thaa XM-B b14-2         72.750
2020-05-31T13:13:34Z Bleae Thaa OR-M c7-6          73.920
2020-05-31T13:14:35Z Bleae Thaa SS-K c8-14         73.985
2020-05-31T13:15:31Z Bleae Thaa YJ-R d4-77         73.824
2020-05-31T13:16:31Z Bleae Thaa XY-P b19-4          9.759
2020-05-31T13:17:26Z Bleae Thaa GB-M b21-6         73.952
2020-05-31T13:18:20Z Bleae Thaa EB-F c11-17        73.845
2020-05-31T13:19:28Z Bleae Thaa JC-D c12-17        74.033

Command

[math]::Round((Get-ChildItem .\Journal.*.log | Get-Content | Select-String -pattern '"event":"FSDJump"' | ConvertFrom-Json | Select-Object -property JumpDist | measure-object JumpDist -sum).sum,2)

Example Output

11609.31

More examples coming soon !

Leave a Reply

Your email address will not be published. Required fields are marked *