Don't set logging level when used as a library

Open
#232 1 comment 0 reactions 0 assignees View on GitHub

@jihtsan is already working on this.

Since Oct 18, 2026.

  • #297 by @jihtsan — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
backend, cli

Research direction

Start at Server.serve and Server._setup_logging, then compare how logging is configured in cli.py. Keep library use from changing application and dependency loggers, while preserving the CLI's intended logging behavior; verify the affected server and CLI paths manually or with the repository's existing tests.

Written by the indexing model from the issue text.

Description

type: feature

Server.serve calls Server._setup_logging which explicitly sets the logging level to INFO and hooks up the tornado logger to the output too.

As a user of a library, I should be able to be in control about what gets printed to the screen of my app and what dependencies of mine log to where.

I can fix this by monkey-patching the code with:

server = Server()
server._setup_logging = lambda: None
server.serve(root=".")

but I think that by default the library should not alter the loggers and they should instead be set in cli.py, allowing the CLI experience to be nice but giving library users the flexibility to set things how they wish.

Dominant language
Python
Stars
1.1k
Forks
149
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lepture/python-livereload

All issues in lepture/python-livereload

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.