Skip to main content
The Overlayed logging module provides comprehensive file and console logging for your application.

About

  • Logs are saved to files in your application’s log directory
    • %APPDATA%\overlayed\<applicationId>\logs
  • Logs are saved to files based on date
  • Logs are automatically deleted after 7 days

Log Levels

The logging module supports multiple log levels:
  • debug - Detailed information for debugging purposes
  • info - General information about application state
  • warn - Warnings that don’t stop execution but should be noted
  • error - Errors that may affect functionality

Using the Logger

Basic Logging

overlay.logger.debug("Overlay initialized successfully");
overlay.logger.info("Game session started", { gameId: "siege" });
overlay.logger.warn("High memory usage detected", { usage: "85%" });
overlay.logger.error("Failed to load game module", { error: errorDetails });
When log arguments are written to file, they’re processed with JSON.stringify().

Infinite Arguments

All log methods accept an infinite number of arguments.
overlay.logger.info(
	"Player action performed",
	{
		playerId: "player123",
		action: "kill",
		timestamp: Date.now(),
		gameMode: "ranked",
	},
    {
        someAdditionalData: "someValue",
    }
});

File Output

Logs are also written to files in your application’s log directory:
  • app.log - Your application’s logs
  • main.log - Overlayed’s logs