Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo ; Prefix all logging messages with "kdcproxy:" #62

Closed
wants to merge 2 commits into from
Closed
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
6 changes: 4 additions & 2 deletions kdcproxy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ def __await_reply(self, pr, rsocks, wsocks, timeout):
sock.sendall(pr.request)
extra = 10 # New connections get 10 extra seconds
except Exception as e:
logging.warning("Conection broken while writing (%s)", e)
logging.warning(
"kdcproxy: Connection broken while writing (%s)", e)
continue
rsocks.append(sock)
wsocks.remove(sock)
Expand All @@ -110,7 +111,8 @@ def __await_reply(self, pr, rsocks, wsocks, timeout):
try:
reply = self.__handle_recv(sock, read_buffers)
except Exception as e:
logging.warning("Connection broken while reading (%s)", e)
logging.warning(
"kdcproxy: Connection broken while reading (%s)", e)
if self.sock_type(sock) == socket.SOCK_STREAM:
# Remove broken TCP socket from readers
rsocks.remove(sock)
Expand Down
8 changes: 5 additions & 3 deletions kdcproxy/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,16 @@ def __init__(self, filenames=None):
try:
self.__cp.read(filenames)
except configparser.Error:
logging.error("Unable to read config file(s): %s", filenames)
logging.error("kdcproxy: Unable to read config file(s): %s",
filenames)

try:
mod = self.__cp.get(self.GLOBAL, "configs")
try:
importlib.import_module("kdcproxy.config." + mod)
except ImportError as e:
logging.log(logging.ERROR, "Error reading config: %s" % e)
logging.log(logging.ERROR,
"kdcproxy: Error reading config: %s" % e)
except configparser.Error:
pass

Expand Down Expand Up @@ -134,7 +136,7 @@ def __init__(self):
except Exception as e:
fmt = (allsub[i], repr(e))
logging.log(logging.WARNING,
"Error instantiating %s due to %s" % fmt)
"kdcproxy: Error instantiating %s due to %s" % fmt)
assert self.__resolvers

# See if we should use DNS
Expand Down