Source-checkedGameplay & overhauls

Events Logger

by Ralnoc · for Factorio

Events Logger provides an event logging system for Factorio that generates formatted event logs based on events documented in the Events API, enabling server administrators to track game events, and build tooling around it.

965Downloads
19 mo agoLast updated
MITLicense
2.0Latest game version

About Events Logger

From Factorio Mod Portal

Events Logger provides an event logging system for Factorio that generates formatted event logs based on events documented in the Events API, enabling server administrators to track game events, and build tooling around it.

Factorio Event Logger

This mod is a fork of royvandongen Factorio-Event-Logger-Mod which does not appear to be getting updated.

It provides an event logging system for Factorio that generates formatted event logs based on events documented in the Events API, enabling server administrators to track game events, and build tooling around it

Features

  • Player Deaths

Logs the death of a player, identifying the cause (PvP, environmental, etc.).

  • Player Join/Leave

Tracks when players join or leave the game and logs their leave reason (e.g., quit, kicked, desync).

  • Chat Logging

Records all chat messages with the sender's name.

  • Research Events

Logs the start, completion, and cancellation of research projects.

  • Entity Placement Tracking

Tracks and logs the number of entities placed by each player.

  • Rocket Launches

Logs whenever a rocket is launched.

  • Evolution Factor Monitoring

Periodically logs the enemy evolution factor.

  • Artillery Events

Tracks and logs artillery triggers.

  • Playtime and Statistics

Periodically logs playtime and entity placement statistics for each player.

  • Event API

Provides an API for other mods to log custom events.

Installation

Mod Portal Installation

  1. Search for "Events Logger" in the in-game Mod Portal.
  2. Click the "Install" button to add the mod to your game.

Manual Installation

  1. Download or clone this repository.
  2. Place the mod folder into your Factorio mods directory.
  3. Start Factorio, and enable the mod in the Mod Manager.

Current Hooks

This mod uses the following event hooks:

  • on_rocket_launched
  • on_rocket_launch_ordered
  • on_cargo_pod_finished_ascending
  • on_research_started
  • on_research_finished
  • on_research_cancelled
  • on_player_banned
  • on_player_unbanned
  • on_player_joined_game
  • on_player_left_game
  • on_pre_player_died
  • on_picked_up_item
  • on_player_repaired_entity
  • on_character_corpse_expired
  • on_built_entity
  • on_trigger_fired_artillery
  • on_console_chat

The statistics logging is performed every 10 minutes.

Default Event Logging

Settings

The mod provides a settings menu to enable or disable the following event logging formats:

  • Factorio Logs - Logs events to the standard factorio-current.log file output. Default is enabled.
  • JSON Logs - Logs events to the script-output/game-events.json file in JSON format. Default is disabled.

Usage

All logs are captured in the standard log output.

Additionally, it is exported as JSON into the file script-output/game-events.json. This can be leveraged by your automation and tooling.You can review these logs for detailed insights into player activities, game events, and overall server health.

Custom Logging

The send_event function allows you to log custom events to the game-events.json file. This function is part of the remote interface event-logger and can be called from other mods or scripts.

Usage

To use the send_event function, you need to call it with a table containing the event details. The table must include the following keys:

  • event: The name of the event (e.g., "EVENT_NAME").
  • tick: The current game tick (e.g., game.tick).
  • data: A table containing additional event data (e.g., {["key"] = value}).

Example

send_event Function

Here is an example of how to call the send_event function:

remote.call("events-logger", "send_event", {
    event = "CUSTOM_EVENT",
    tick = game.tick,
    data = {
        key1 = "value1",
        key2 = "value2"
    }
})

send_std_log Function

Here is an example of how to call the send_event function:

remote.call("events-logger", "send_std_log",
        CUSTOM_EVENT,
        MESSAGE
)

Log Cleanup Examples

The script-output/game-events.json file is created and maintained by the helpers.write_file function. This function, however, does not perform any log rotation or cleanup. It is recommended to implement a log rotation mechanism to prevent the file from growing indefinitely.

Linux - logrotate

If you are running your dedicated server on Linux, you can use the logrotate utility to manage log rotation. You need to remember that you have to truncate, not delete the file. It is held open by Factorio server and deleting it will not free up the disk space, and instead make new content inaccessible until the Factorio server is restarted.

Here is an example of a logrotate configuration file for Factorio:

/opt/factorio/script-output/game-events.json
{
    missingok
    daily
    copytruncate
    rotate 4
    compress
    notifempty
}

Windows - PowerShell Log-Rotate

If you are running your dedicated server on Windows, you can use the Log-Rotate package to manage log rotation. Github Repo

Installation

You can install the Log-Rotate module from the PowerShell Gallery using the following command:

Install-Module -Name Log-Rotate -RequiredVersion 1.6.1

Here is an example of a Log-Rotate PowerShell script for log rotation:

Import-Module Log-Rotate

# Define your config
# Double-quotes necessary only if there are spaces in the path
$config = @'
"C:\games\factorio\script-output/game-events.json" {
    missingok
    daily
    copytruncate
    rotate 4
    compress
    notifempty
}
'@

# Decide on a Log-Rotate state file that will be created by Log-Rotate
$state = 'C:\var\Log-Rotate\Log-Rotate.status'

Read the full description on Factorio Mod Portal →

Highlights

From source data

Game versions

Built for Factorio 2.0.

Footprint

Rated a light load on a server.

License

Published under MIT.

Events Logger on Nxeon

From our catalogue
One-click install
Supported on Nxeon Factorio servers. We download it from Factorio Mod Portal, place it, and restart the server.
Server side
Required on the server
Server load
light
Smallest plan we suggest
Factorio — 2 GB (2 GB RAM). This follows our own load rating above, not a benchmark.
Latest build
0.0.38, released 2025-04-02

Recent builds

BuildReleasedGame versionsLoaders
0.0.382025-04-022.0n/a
0.0.372025-01-292.0n/a
0.0.362025-01-292.0n/a
0.0.352025-01-292.0n/a
0.0.322025-01-262.0n/a
0.0.312025-01-242.0n/a

Dependencies

Declared by the newest build that lists any. Required ones are installed with it on one-click installs.

Run Events Logger on a Factorio server

Pick a server or deploy a new one above; it is installed in one click.

What kind of mod it is

From the catalog
Listed on Factorio Mod Portal as “Mods”

Gameplay & overhauls

New mechanics, content and overhauls that change how the game plays.

Runs on your server

From source side support

Factorio Mod Portal lists Events Logger as required on the server. Check its Factorio Mod Portal page to see whether players need it too.

Compatibility

Game
Factorio
Runs on
Serverrequired on the server
Game versions
2.0

Verified at the source

  • ✓Factorio Mod PortalOfficial listing, checked 2026-10-09Open ↗
  • ✓AuthorRalnoc, as published on Factorio Mod Portal
  • ✓LicenseMITFree

Events Logger, answered

Generated from the mod’s own source data.

Do my players need to install Events Logger?

Factorio Mod Portal lists Events Logger as required on the server. Check its Factorio Mod Portal page to see whether players need it too.

Is it free?

Yes. Events Logger is free to download from Factorio Mod Portal. Its license is MIT.

How do I add it to my Nxeon server?

Use “Add to a server” on this page, or open NxLabs from your dashboard. We install it, restart your server and switch it on.

NxLabs

Run Events Logger on a Factorio server.

Deploy in about a minute from $2.99 a month, then add Events Logger in one click.