From ade45033558b321ba447f93cc22b6a205b44be93 Mon Sep 17 00:00:00 2001 From: Juhani Haverinen Date: Mon, 7 Nov 2016 17:28:07 +0200 Subject: [PATCH] Add protocol logging --- neomi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neomi.py b/neomi.py index c8daa26..d27a0af 100644 --- a/neomi.py +++ b/neomi.py @@ -571,13 +571,13 @@ class Serve(threading.Thread): file = get_file(full_path, config = self.config) except FileNotFoundError: - log('%s: Requested path not found: %s' % (self.address, path)) + log('%s [%s]: Requested path not found: %s' % (self.address, protocol.name, path)) reader = StringReader('%s not found\n' % path) send_header(self.sock, protocol, Status.notfound, 'text/plain', config = self.config) send_file(self.sock, reader, protocol, 'text/plain', config = self.config) else: - log('%s requested path %s' % (self.address, path)) + log('%s [%s] requested path %s' % (self.address, protocol.name, path)) reader = FileReader(file) send_header(self.sock, protocol, Status.ok, mimetype, config = self.config)