Administration/Configuration Files
Logger Configuration
Configure the logging system for your Gigantics instance, including log levels and output formats.
Configuration Properties
The logger configuration can be set in your config/default.yaml file:
Property Details
level
- Type: String
- Default:
'silly'in development,'http'in production,'test'in test environment - Description: Controls the verbosity of log output. Available levels (in order of verbosity):
error- Only errorswarn- Errors and warningsinfo- Errors, warnings, and info messageshttp- HTTP request logging and aboveverbose- Detailed informationdebug- Debugging informationsilly- Everything including silly messages
output
- Type: String
- Default:
'dev' - Description: Controls the log output format.
'dev'- Colored, human-readable format for development- Other formats can be specified as needed
Examples
Development Logging
Production Logging
Minimal Logging
Verbose HTTP Logging
Environment-Based Defaults
The application automatically sets different log levels based on the environment:
- Development:
sillylevel for maximum detail - Production:
httplevel for HTTP request logging - Test:
testlevel for testing environment
You can check your environment with:
Command Line Override
You can override the log level using the command line:
Available Log Levels
| Level | Description |
|---|---|
| error | Only critical errors |
| warn | Errors and warnings |
| info | General information messages |
| http | HTTP request/response logging |
| verbose | More detailed information |
| debug | Debugging information |
| silly | Everything including silly messages |
Best Practices
- Production: Use
httporinfolevels to avoid excessive log volume - Development: Use
sillyordebuglevels for detailed troubleshooting - Monitoring: Ensure logs are properly rotated and stored
- Security: Be careful about logging sensitive information
- Performance: Lower log levels can improve performance in high-traffic environments
Testing Configuration Changes
After modifying logger configuration:
-
Restart the application:
-
Perform some actions in the application to generate log entries
-
Check the log file specified in the
logsconfiguration to verify the new log level is active