mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Use rich logging for Pelican server
This commit is contained in:
parent
e2c73a0a16
commit
0b9a488c26
2 changed files with 6 additions and 2 deletions
|
|
@ -12,6 +12,7 @@ try:
|
|||
except ImportError:
|
||||
magic_from_file = None
|
||||
|
||||
from pelican.log import console # noqa: F401
|
||||
from pelican.log import init as init_logging
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
@ -104,6 +105,9 @@ class ComplexHTTPRequestHandler(server.SimpleHTTPRequestHandler):
|
|||
|
||||
return mimetype
|
||||
|
||||
def log_message(self, format, *args):
|
||||
logger.info(format, *args)
|
||||
|
||||
|
||||
class RootedHTTPServer(server.HTTPServer):
|
||||
def __init__(self, base_path, *args, **kwargs):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue