Skip to content

Commit

Permalink
Merge pull request #1718 from HubSpot/chunk-debug-log
Browse files Browse the repository at this point in the history
log when a new file chunk has been created
  • Loading branch information
repeatedly authored Oct 19, 2017
2 parents d3b7837 + 2397b9b commit 12359e9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/fluent/plugin/buf_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,14 @@ def resume
def generate_chunk(metadata)
# FileChunk generates real path with unique_id
if @file_permission
Fluent::Plugin::Buffer::FileChunk.new(metadata, @path, :create, perm: @file_permission, compress: @compress)
chunk = Fluent::Plugin::Buffer::FileChunk.new(metadata, @path, :create, perm: @file_permission, compress: @compress)
else
Fluent::Plugin::Buffer::FileChunk.new(metadata, @path, :create, compress: @compress)
chunk = Fluent::Plugin::Buffer::FileChunk.new(metadata, @path, :create, compress: @compress)
end

log.debug "Created new chunk", chunk_id: dump_unique_id_hex(chunk.unique_id), metadata: metadata

return chunk
end
end
end
Expand Down

0 comments on commit 12359e9

Please sign in to comment.