Skip to content

Commit

Permalink
Merge pull request #27 from WinRb/add-zip-creation-logging
Browse files Browse the repository at this point in the history
Log when a file is added to the zip
  • Loading branch information
sneal committed Dec 15, 2015
2 parents d9b0057 + 58653a0 commit 391662c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.md
Expand Up @@ -2,6 +2,7 @@

# 0.2.4
- Fix issue 21, downloading files is extremely slow.
- Add zip file creation debug logging.

# 0.2.3
- Fix yielding progress data, issue #23
Expand Down
2 changes: 2 additions & 0 deletions lib/winrm-fs/core/temp_zip_file.rb
Expand Up @@ -124,6 +124,7 @@ def initialize(zip_definition)
@zip_definition = zip_definition
@basedir = zip_definition.basedir
@zip = Zip::File.open(zip_definition.path, Zip::File::CREATE)
@logger = Logging.logger[self]
end

def build
Expand Down Expand Up @@ -159,6 +160,7 @@ def add_directory(dir)
end

def add_file(file)
@logger.debug("Adding file to zip: #{file}")
write_zip_entry(file, basedir)
end

Expand Down

0 comments on commit 391662c

Please sign in to comment.