Skip to content

Commit

Permalink
obj,CH: better log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
fvennetier committed Aug 16, 2019
1 parent eaa45f8 commit c237d60
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions oioswift/common/middleware/container_hierarchy.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,8 +827,9 @@ def _list_objects(self, env, account, ct_parts, header_cb,
obj_prefix = self.DELIMITER.join(ct_parts[1:] + ['', ])

if not resp.is_success or resp.content_length == 0:
LOG.warn("%s: Failed to list %s",
self.SWIFT_SOURCE, sub_path)
if resp.status_int != 404:
LOG.warn("%s: Failed to list %s: %s",
self.SWIFT_SOURCE, sub_path, resp.status)
return
with closing_if_possible(resp.app_iter):
items = json.loads(resp.body)
Expand Down
10 changes: 6 additions & 4 deletions oioswift/proxy/controllers/obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,10 +496,12 @@ def _link_object(self, req):

from_account = req.headers.get('X-Copy-From-Account',
self.account_name)
self.app.logger.info("LINK (%s,%s,%s) TO (%s,%s,%s)",
from_account, self.container_name,
self.object_name,
self.account_name, container, obj)
self.app.logger.info("Creating link from %s/%s/%s to %s/%s/%s",
# Existing
from_account, container, obj,
# New
self.account_name, self.container_name,
self.object_name)
storage = self.app.storage

if req.headers.get('Range'):
Expand Down

0 comments on commit c237d60

Please sign in to comment.