-
Notifications
You must be signed in to change notification settings - Fork 8
Standardize logging: Remove manual prefixes #186
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
Open
prk-Jr
wants to merge
1
commit into
main
Choose a base branch
from
184-standardize-logging-remove-manual-prefixes-add-module-target-to-logger-format
base: main
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
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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -185,7 +185,7 @@ impl<P: StreamProcessor> StreamingPipeline<P> { | |
| message: "Failed to decompress gzip".to_string(), | ||
| })?; | ||
|
|
||
| log::info!("[Gzip] Decompressed size: {} bytes", decompressed.len()); | ||
| log::info!("Decompressed size: {} bytes", decompressed.len()); | ||
|
|
||
| // Process the decompressed content | ||
| let processed = self | ||
|
|
@@ -195,7 +195,7 @@ impl<P: StreamProcessor> StreamingPipeline<P> { | |
| message: "Failed to process content".to_string(), | ||
| })?; | ||
|
|
||
| log::info!("[Gzip] Processed size: {} bytes", processed.len()); | ||
| log::info!("Processed size: {} bytes", processed.len()); | ||
|
|
||
| // Recompress the output | ||
| let mut encoder = GzEncoder::new(output, Compression::default()); | ||
|
|
@@ -228,10 +228,7 @@ impl<P: StreamProcessor> StreamingPipeline<P> { | |
| message: "Failed to decompress gzip".to_string(), | ||
| })?; | ||
|
|
||
| log::info!( | ||
| "[Gzip->None] Decompressed size: {} bytes", | ||
| decompressed.len() | ||
| ); | ||
| log::info!("Gzip->None decompressed size: {} bytes", decompressed.len()); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ⛏️ Change to |
||
|
|
||
| // Process the decompressed content | ||
| let processed = self | ||
|
|
@@ -241,7 +238,7 @@ impl<P: StreamProcessor> StreamingPipeline<P> { | |
| message: "Failed to process content".to_string(), | ||
| })?; | ||
|
|
||
| log::info!("[Gzip->None] Processed size: {} bytes", processed.len()); | ||
| log::info!("Gzip->None processed size: {} bytes", processed.len()); | ||
|
|
||
| // Write uncompressed output | ||
| output | ||
|
|
@@ -287,7 +284,7 @@ impl<P: StreamProcessor> StreamingPipeline<P> { | |
| })?; | ||
|
|
||
| log::info!( | ||
| "[Deflate->None] Decompressed size: {} bytes", | ||
| "Deflate->None decompressed size: {} bytes", | ||
| decompressed.len() | ||
| ); | ||
|
|
||
|
|
@@ -299,7 +296,7 @@ impl<P: StreamProcessor> StreamingPipeline<P> { | |
| message: "Failed to process content".to_string(), | ||
| })?; | ||
|
|
||
| log::info!("[Deflate->None] Processed size: {} bytes", processed.len()); | ||
| log::info!("Deflate->None processed size: {} bytes", processed.len()); | ||
|
|
||
| // Write uncompressed output | ||
| output | ||
|
|
@@ -350,7 +347,7 @@ impl<P: StreamProcessor> StreamingPipeline<P> { | |
| })?; | ||
|
|
||
| log::info!( | ||
| "[Brotli->None] Decompressed size: {} bytes", | ||
| "Brotli->None decompressed size: {} bytes", | ||
| decompressed.len() | ||
| ); | ||
|
|
||
|
|
@@ -362,7 +359,7 @@ impl<P: StreamProcessor> StreamingPipeline<P> { | |
| message: "Failed to process content".to_string(), | ||
| })?; | ||
|
|
||
| log::info!("[Brotli->None] Processed size: {} bytes", processed.len()); | ||
| log::info!("Brotli->None processed size: {} bytes", processed.len()); | ||
|
|
||
| // Write uncompressed output | ||
| output | ||
|
|
@@ -462,7 +459,7 @@ impl StreamProcessor for HtmlRewriterAdapter { | |
|
|
||
| if !chunk.is_empty() { | ||
| log::debug!( | ||
| "[HtmlRewriter] Buffering chunk: {} bytes, total buffered: {} bytes", | ||
| "Buffering chunk: {} bytes, total buffered: {} bytes", | ||
| chunk.len(), | ||
| self.accumulated_input.len() | ||
| ); | ||
|
|
@@ -471,7 +468,7 @@ impl StreamProcessor for HtmlRewriterAdapter { | |
| // Only process when we have all the input | ||
| if is_last { | ||
| log::info!( | ||
| "[HtmlRewriter] Processing complete document: {} bytes", | ||
| "Processing complete document: {} bytes", | ||
| self.accumulated_input.len() | ||
| ); | ||
|
|
||
|
|
@@ -488,17 +485,17 @@ impl StreamProcessor for HtmlRewriterAdapter { | |
|
|
||
| // Process the entire document | ||
| rewriter.write(&self.accumulated_input).map_err(|e| { | ||
| log::error!("[HtmlRewriter] Failed to process HTML: {}", e); | ||
| log::error!("Failed to process HTML: {}", e); | ||
| io::Error::other(format!("HTML processing failed: {}", e)) | ||
| })?; | ||
|
|
||
| // Finalize the rewriter | ||
| rewriter.end().map_err(|e| { | ||
| log::error!("[HtmlRewriter] Failed to finalize: {}", e); | ||
| log::error!("Failed to finalize: {}", e); | ||
| io::Error::other(format!("HTML finalization failed: {}", e)) | ||
| })?; | ||
|
|
||
| log::debug!("[HtmlRewriter] Output size: {} bytes", output.len()); | ||
| log::debug!("Output size: {} bytes", output.len()); | ||
| self.accumulated_input.clear(); | ||
| Ok(output) | ||
| } else { | ||
|
|
||
This file contains hidden or 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
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.
⛏️ Remove stream: