Skip to content

Commit

Permalink
remove code from an old fork branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Relm-Arrowny authored and stan-dot committed Oct 4, 2024
1 parent 65ef4ac commit 629aead
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
4 changes: 1 addition & 3 deletions src/blueapi/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ def main(ctx: click.Context, config: Path | None | tuple[Path, ...]) -> None:
loaded_config: ApplicationConfig = config_loader.load()

ctx.obj["config"] = loaded_config
logging.basicConfig(
format="%(asctime)s - %(message)s", level=loaded_config.logging.level
)
logging.basicConfig(level=loaded_config.logging.level)

if ctx.invoked_subcommand is None:
print("Please invoke subcommand!")
Expand Down
2 changes: 1 addition & 1 deletion src/blueapi/service/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def setup(config: ApplicationConfig) -> None:

# Eagerly initialize worker and messaging connection

logging.basicConfig(format="%(asctime)s - %(message)s", level=config.logging.level)
logging.basicConfig(level=config.logging.level)
worker()
messaging_template()

Expand Down
8 changes: 0 additions & 8 deletions src/blueapi/service/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,15 +332,7 @@ def set_state(

def start(config: ApplicationConfig):
import uvicorn
from uvicorn.config import LOGGING_CONFIG

LOGGING_CONFIG["formatters"]["default"]["fmt"] = (
"%(asctime)s %(levelprefix)s %(message)s"
)
LOGGING_CONFIG["formatters"]["access"]["fmt"] = (
"%(asctime)s %(levelprefix)s %(client_addr)s"
+ " - '%(request_line)s' %(status_code)s"
)
app.state.config = config
uvicorn.run(app, host=config.api.host, port=config.api.port)

Expand Down

0 comments on commit 629aead

Please sign in to comment.