Logger Edit
π Overview
The logger module provides a flexible way to integrate custom logging functionality. Located in editable/server/logger.lua, this module handles both server-side logging and Discord webhook integration.
π§ Core Functions
Basic Logging
--- Log an event to the server
--- @param src number|string Source of the event (player id or "SYSTEM")
--- @param event string Event name/type
--- @param message any Message or data to log
EditableLogger.log(src, event, message)Discord Webhook Integration
--- Send a log to Discord webhook
--- @param data table Webhook data structure
EditableLogger.logDiscord(data)π Data Structures
Discord Webhook Data
βοΈ Customization Tips
Adding New Log Types
Add webhook URL in configuration
Define color code
Create log format
Implement logging call
π οΈ Error Handling
Always check webhook URLs validity
Handle missing configuration gracefully
Validate data structures before logging
Implement fallback logging methods
Integrated by Sahara Scripters - Making logs more interesting than your server chat
Last updated