Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: extend log-http flag docs and better explain syntax of flags supporting multiple data sources #807

Merged
merged 15 commits into from
May 21, 2024

Conversation

mmatczuk
Copy link
Contributor

@mmatczuk mmatczuk commented May 20, 2024

Relevant changes in flags

    --log-http [api|proxy:]<none|short-url|url|headers|body|errors>,...  (default errors) (env FORWARDER_LOG_HTTP)
        HTTP request and response logging mode. 
        
        Modes: 
        - none: no logging
        - short-url: logs [scheme://]host[/path] instead of the full URL
        - url: logs the full URL including query parameters
        - headers: logs request line and headers
        - body: logs request line, headers, and body
        - errors: logs request line and headers if status code is greater than or equal to 500
        
        Modes for different modules can be specified separated by commas. 
        Example: "--log-http=api:errors,proxy:headers,url" specifies that the API module logs errors, the proxy module
        logs headers, and anything else logs full URL.
    -p, --pac <path or URL> (env FORWARDER_PAC)
        Proxy Auto-Configuration file to use for upstream proxy selection. 
        
        Syntax:
        - File: /path/to/file.pac
        - URL: http://example.com/proxy.pac
        - Embed: data:base64,<base64 encoded data>
        - Stdin: -
    --tls-cert-file <path or base64> (env FORWARDER_TLS_CERT_FILE)
        TLS certificate to use if the server protocol is https or h2. 
        
        Syntax:
        - File: /path/to/file.pac
        - Embed: data:base64,<base64 encoded data>

mmatczuk added 5 commits May 17, 2024 10:00
Mode cannot be empty if Logger is correctly constructed.
--log-http [api|proxy:]<none|short-url|url|headers|body|errors>,...  (default errors) (env FORWARDER_LOG_HTTP)
According to HTML spec

> The <br> HTML element produces a line break in text (carriage-return). It is useful for writing a poem or an address, where the division of lines is significant.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br
@mmatczuk mmatczuk requested a review from Choraden as a code owner May 20, 2024 14:48
# the documentation for the -H, --header flag for more details on the format.
# Use --connect-header flag instead.
#
DEPRECATED: --connect-header
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deprecated notice should be also commented, shouldn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔

@Choraden
Copy link
Contributor

Apart from the deprecated notice LGTM

@mmatczuk
Copy link
Contributor Author

@Choraden PTAL

@mmatczuk mmatczuk changed the title docs: extend log-http flag docs docs: extend log-http flag docs and better explain syntax of flags supporting multiple data sources May 21, 2024
@Choraden
Copy link
Contributor

Screenshot 2024-05-21 at 11 36 50

Embed: data:base64,<base64 encoded data> is not rendering well

@mmatczuk mmatczuk merged commit 0eebfbc into main May 21, 2024
6 checks passed
@mmatczuk mmatczuk deleted the mmt/log_docs branch May 21, 2024 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants