Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions h5pyd/_hl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
##############################################################################

from __future__ import absolute_import
import logging
logging.getLogger("h5pyd").addHandler(logging.NullHandler())
13 changes: 0 additions & 13 deletions h5pyd/_hl/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1082,19 +1082,6 @@ def __init__(self, oid, file=None, track_order=None):
self.log = self._id.http_conn.logging
self.req_prefix = None # derived class should set this to the URI of the object
self._file = file
# self._name = None

if not self.log.handlers:
# setup logging
log_path = os.getcwd()
if not os.access(log_path, os.W_OK):
log_path = "/tmp"
log_file = os.path.join(log_path, "h5pyd.log")
self.log.setLevel(logging.INFO)
fh = logging.FileHandler(log_file)
self.log.addHandler(fh)
else:
pass

if track_order is None:
# set order based on group creation props
Expand Down
2 changes: 0 additions & 2 deletions h5pyd/_hl/folders.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ def __init__(

"""

self.log = logging.getLogger("h5pyd")

if len(domain_name) == 0:
raise ValueError("Invalid folder name")

Expand Down
5 changes: 3 additions & 2 deletions h5pyd/_hl/httpconn.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,10 @@ def __init__(
self._objdb = None
self._logger = logger
if logger is None:
self.log = logging
self.log = logging.getLogger("h5pyd")
else:
self.log = logging.getLogger(logger)
self.log = logger

msg = f"HttpConn.init(domain: {domain_name} use_session: {use_session} "
msg += f"use_cache: {use_cache} retries: {retries}"
self.log.debug(msg)
Expand Down
Loading