chore: remove debug logging from text plugin
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -48,8 +48,6 @@ impl TextMetaPlugin {
|
||||
outputs,
|
||||
);
|
||||
|
||||
log::debug!("TEXT: Plugin initialized with outputs: {:?}", base.outputs);
|
||||
|
||||
// Get text_detect_size (previously max_buffer_size)
|
||||
let max_buffer_size = base.options.get("text_detect_size")
|
||||
.or_else(|| base.options.get("max_buffer_size")) // Handle backward compatibility
|
||||
@@ -330,50 +328,32 @@ impl TextMetaPlugin {
|
||||
// Handle the last line if tracking line lengths
|
||||
self.handle_last_line_for_length_tracking();
|
||||
|
||||
// Debug: check if outputs are configured
|
||||
log::debug!("TEXT: Outputs: {:?}", self.base.outputs());
|
||||
log::debug!("TEXT: Word count: {}, Line count: {}", self.word_count, self.line_count);
|
||||
|
||||
// Output word count if tracked
|
||||
if let Some(meta_data) = self.output_word_count_metadata() {
|
||||
log::debug!("TEXT: Adding word count metadata: {:?}", meta_data);
|
||||
metadata.push(meta_data);
|
||||
} else {
|
||||
log::debug!("TEXT: Word count output is disabled or not mapped");
|
||||
}
|
||||
|
||||
// Output line count if tracked
|
||||
if let Some(meta_data) = self.output_line_count_metadata() {
|
||||
log::debug!("TEXT: Adding line count metadata: {:?}", meta_data);
|
||||
metadata.push(meta_data);
|
||||
} else {
|
||||
log::debug!("TEXT: Line count output is disabled or not mapped");
|
||||
}
|
||||
|
||||
// Output line length statistics if tracked
|
||||
if self.track_line_lengths && self.line_count_for_stats > 0 {
|
||||
log::debug!("TEXT: Output flags - max: {}, mean: {}, median: {}",
|
||||
self.output_line_max_len, self.output_line_mean_len, self.output_line_median_len);
|
||||
|
||||
// Calculate and output max line length if enabled
|
||||
if let Some(meta_data) = self.output_max_line_length_metadata() {
|
||||
log::debug!("TEXT: Adding max line length metadata: {:?}", meta_data);
|
||||
metadata.push(meta_data);
|
||||
}
|
||||
|
||||
// Calculate and output mean line length if enabled
|
||||
if let Some(meta_data) = self.output_mean_line_length_metadata() {
|
||||
log::debug!("TEXT: Adding mean line length metadata: {:?}", meta_data);
|
||||
metadata.push(meta_data);
|
||||
}
|
||||
|
||||
// Calculate and output median line length if enabled
|
||||
if let Some(meta_data) = self.output_median_line_length_metadata() {
|
||||
log::debug!("TEXT: Adding median line length metadata: {:?}", meta_data);
|
||||
metadata.push(meta_data);
|
||||
}
|
||||
} else {
|
||||
log::debug!("TEXT: Line lengths tracking is disabled or no lines processed");
|
||||
}
|
||||
|
||||
metadata
|
||||
@@ -434,7 +414,6 @@ impl MetaPlugin for TextMetaPlugin {
|
||||
// If we've reached our buffer limit, drop the buffer to save memory
|
||||
// But don't finalize yet - we need to keep counting words and lines
|
||||
if buffer_len >= self.max_buffer_size {
|
||||
log::debug!("TEXT: Reached max buffer size, dropping buffer but not finalizing");
|
||||
self.buffer = None; // Drop the buffer
|
||||
}
|
||||
false // Never finalize here for text content
|
||||
@@ -508,12 +487,8 @@ impl MetaPlugin for TextMetaPlugin {
|
||||
|
||||
// If content is text, output word and line counts
|
||||
if self.is_binary_content == Some(false) {
|
||||
log::debug!("TEXT: Content is text, outputting word and line counts");
|
||||
let word_line_metadata = self.output_word_line_counts();
|
||||
log::debug!("TEXT: Word line metadata: {:?}", word_line_metadata);
|
||||
metadata.extend(word_line_metadata);
|
||||
} else {
|
||||
log::debug!("TEXT: Content is not text, not outputting word and line counts. is_binary_content: {:?}", self.is_binary_content);
|
||||
}
|
||||
|
||||
// Drop the buffer since we're done with it
|
||||
@@ -521,8 +496,6 @@ impl MetaPlugin for TextMetaPlugin {
|
||||
|
||||
// Mark as finalized
|
||||
self.is_finalized = true;
|
||||
|
||||
log::debug!("TEXT: Finalizing with metadata: {:?}", metadata);
|
||||
MetaPluginResponse {
|
||||
metadata,
|
||||
is_finalized: true,
|
||||
|
||||
Reference in New Issue
Block a user