Adding the Dependency
To use the API, you need to include the Fivemanage Logger as a dependency in your project.Maven
Logging Methods
TheFivemanageLogger class provides several static methods for different log levels. Every method requires a dataset name, a message, and an optional metadata map.
Log Levels
Using Metadata
Metadata is a powerful way to add context to your logs. It allows you to filter and aggregate data in your dashboards.Best Practices for API Usage
- Use Descriptive Datasets: Group related logs into datasets (e.g.,
economy,combat,admin-actions). - Consistent Metadata Keys: Use consistent keys for metadata across different logs to make querying easier (e.g., always use
player_idinstead of mixinguuid,player_uuid, andid). - Avoid High Cardinality in Messages: Keep the
messagestring relatively static and put variable data (like player names or coordinates) into themetadata. - Don’t Log Sensitive Info: Never log passwords, private keys, or sensitive player information.
.png?fit=max&auto=format&n=tUtwuHgibAuVylZ9&q=85&s=44653a825fa0664047dae92cd8969b2d)
