Create a trace mode for SQL inspection
This commit is contained in:
parent
48c30fdcf8
commit
95d67b4aeb
1 changed files with 4 additions and 2 deletions
|
@ -103,14 +103,16 @@ def make_app():
|
|||
@cli.command()
|
||||
@click.option("--hostname", "hostname", type=str, default="0.0.0.0")
|
||||
@click.option("--port", "port", type=int, default=8080)
|
||||
@click.option("--trace/--no-trace", "trace", default=False)
|
||||
@click.option("--config", type=Path)
|
||||
def serve(hostname: str, port: int, config: Path):
|
||||
def serve(hostname: str, port: int, config: Path, trace: bool):
|
||||
logging.basicConfig(
|
||||
format="%(asctime)s %(threadName)s - %(name)s - %(levelname)s - %(message)s",
|
||||
level=logging.INFO,
|
||||
)
|
||||
|
||||
logging.getLogger("tentacles").setLevel(logging.DEBUG)
|
||||
if trace:
|
||||
logging.getLogger("tentacles.db").setLevel(logging.DEBUG - 1)
|
||||
|
||||
app = make_app()
|
||||
|
|
Loading…
Reference in a new issue