Skip to content

Security Monitoring

DjangoAPI Guard provides robust security logging capabilities for monitoring and analytics.


Basic Logging

GUARD_SECURITY_CONFIG = SecurityConfig(
    custom_log_file="/path/to/security.log"
)

Passive Mode for Penetration Detection

GUARD_SECURITY_CONFIG = SecurityConfig(
    enable_penetration_detection=True,
    passive_mode=True  # Log but don't block
)

Configurable Log Levels

GUARD_SECURITY_CONFIG = SecurityConfig(
    log_request_level="INFO",
    log_suspicious_level="WARNING"
)

Log Analysis

DjangoAPI Guard logs contain valuable security intelligence, including:

  • IP addresses attempting suspicious actions
  • Pattern matches indicating attack vectors
  • Geographic origins of traffic
  • Rate limiting violations
  • Cloud provider origins