# Storm Development Logging

This directory contains log files for the Storm Development application.

## Directory Structure

- `app/` - Application-specific logs
  - `storm_app.log` - Main application log
  - `debug.log` - Debug information (development only)

- `django/` - Django framework logs
  - `django.log` - Django system logs

- `errors/` - Error-specific logs
  - `errors.log` - All error and critical messages

- `archive/` - Archived/rotated log files

## Log Levels

- **DEBUG**: Detailed information for debugging
- **INFO**: General information about application flow
- **WARNING**: Something unexpected happened, but the app is still working
- **ERROR**: A serious problem occurred
- **CRITICAL**: A very serious error occurred

## Log Rotation

Log files are automatically rotated when they reach their maximum size:
- Application logs: 10MB max, 5 backups
- Django logs: 5MB max, 3 backups
- Error logs: 5MB max, 10 backups
- Debug logs: 20MB max, 2 backups

## Usage in Code

```python
import logging

# Get logger for your module
logger = logging.getLogger('storm.your_module')

# Log messages
logger.debug('Debug information')
logger.info('General information')
logger.warning('Warning message')
logger.error('Error occurred')
logger.critical('Critical error')
```

## Environment-Specific Behavior

**Development (DEBUG=True):**
- Colored console output
- Debug logs written to file
- All log levels displayed

**Production (DEBUG=False):**
- Simple console output
- No debug file logging
- Error emails sent to admins
- Syslog integration
