Game Asset Generator
by MubarakHAlketbi
Verified
- game-asset-mcp
- logs
# Logs Directory
This directory is used to store log files generated by the Game Asset Generator server. The main log file is `server.log`, which contains a record of all server operations, API calls, errors, and other important events.
## Log Format
Each log entry follows this format:
```
[LEVEL] TIMESTAMP - MESSAGE
```
Where:
- **LEVEL**: The log level (INFO, DEBUG, ERROR, WARN)
- **TIMESTAMP**: ISO 8601 timestamp (e.g., 2025-03-17T06:45:12.345Z)
- **MESSAGE**: The log message content
## Log Levels
The server uses the following log levels:
- **INFO**: General information about server operations (startup, connections, asset generation)
- **DEBUG**: Detailed information useful for debugging (API calls, processing steps)
- **ERROR**: Error conditions that might cause failures (API errors, file system issues)
- **WARN**: Warning conditions that don't cause failures but might need attention
## Log File Management
The server appends to the log file with each new entry. For production use, consider implementing log rotation to prevent the log file from growing too large.
## Viewing Logs
You can view the logs using any text editor or with command-line tools:
```bash
# View the entire log file
cat server.log
# View the last 50 lines
tail -n 50 server.log
# Follow the log in real-time
tail -f server.log
# Filter for errors only
grep "ERROR" server.log
```
## Troubleshooting
If the server fails to write to the log file, check:
1. Permissions on the logs directory
2. Available disk space
3. File system errors
The server will continue to operate even if logging to the file fails, as it will still output logs to the console.