forked from squid-cache/squid
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add %byte{value} logformat code for logging or sending arbitrary bytes #236
Open
eduard-bagdasaryan
wants to merge
28
commits into
master
Choose a base branch
from
SQUID-710-byte-logformat
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
af8b89b
Add %byte{value} logformat code for logging or sending arbitrary bytes
eduard-bagdasaryan 2f72f5f
Eliminated code duplication in ProxyProtocol::IntegerToFieldType()
eduard-bagdasaryan 44ed8a0
Moved ParseInteger() helper into a dedicated header
eduard-bagdasaryan 44dd130
Added an std header
eduard-bagdasaryan edf6af0
Moved implementation details into a Parser::Impl namespace
eduard-bagdasaryan 675b391
Eliminated code duplication in AnyP::Uri::parsePort()
eduard-bagdasaryan 1607848
Eliminated code duplication in Ip::NfMarkConfig::Parse()
eduard-bagdasaryan ed4fde4
Removed trailing whitespaces
eduard-bagdasaryan 2b55e7d
Autoformatted
eduard-bagdasaryan 2c97d6b
Polished
eduard-bagdasaryan f9c8c47
fixup: Renamed Parser::Impl to Detail_
rousskov f2481ae
fixup: Use a more common namespace closing comment format
rousskov dbcafa5
fixup: Polished new names
rousskov 29d34c9
fixup: Detail_::DecimalInteger() should not assume 0 is in range
rousskov a1640a2
fixup: Do not describe individual ByteCode_t values
rousskov c10e66b
fixup: Use a slightly more logical place for declaring LFT_BYTE
rousskov 9f218e9
fixup: Added missing description to the new function
rousskov 2b1f592
Revert branch AnyP::Uri changes
rousskov 7b3b554
Revert branch Ip::NfMarkConfig changes
rousskov 9dea5e9
Fixed branch code doing PROXY protocol TLV parsing
rousskov 7adfe65
Cancel failed branch attempt to reduce code duplication
rousskov e890a64
fixup: Tightened parsing to avoid overpromising and underdeliveriing
rousskov 2f4002d
fixup: We _need_ these limits to be constexpr
rousskov 799f484
fixup: Slightly better names
rousskov af1e7c7
fixup: Added a tricky/important example of an invalid input
rousskov 9ccf1b7
fixup: Formatted modified sources
rousskov 5cc2517
fixup: Make our simplifying assumptions explicit
rousskov a985e8d
fixup: Better diagnostic for negative decimals
rousskov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify: adding %byte{10} results in a genuine new line in access.log (i.e., not a couple of characters "\n"). Is this an intended/expected behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is. In fact, IIRC, adding new lines is the use case that prompted the addition of this feature. Nearly all other ASCII characters can probably be added (as those characters) without a new logformat %code.
Adding new lines is useful when, for example, access records go to a logging daemon that expects HTTP header-like record syntax.