Common Log Format Module

1. Variables

  • nginx_error_grammar - LPEG grammar to parse an Nginx error log line

2. Functions

2.1. build_nginx_grammar

Constructs an LPEG grammar based on the Nginx log_format configuration string.

Arguments

  • log_format (string) - Nginx log_format configuration string

Return

  • grammar (LPEG user data object) or an error is thrown

2.2. build_apache_grammar

Constructs an LPEG grammar based on the Apache log_format configuration string.

Arguments

  • log_format (string) - Apache log_format configuration string

Return

  • grammar (LPEG user data object) or an error is thrown

2.3. normalize_user_agent

Extracts the browser, version and os information from a user agent string.

Arguments

  • ua (string) - user agent string

Return

  • browser (string)
  • version (number)
  • os (string)

source code: common_log_format.lua

results matching ""

    No results matching ""