sgl-project / sglang

SGLang is a fast serving framework for large language models and vision language models.
https://sgl-project.github.io/
Apache License 2.0
6.22k stars 532 forks source link

[router] Replace print with logger #2183

Closed ByronHsu closed 3 hours ago

ByronHsu commented 3 hours ago

Motivation

Modifications

Looks something like this

[Router (Python)] 2024-11-25 21:28:33 - INFO - Launching DP server process 0 on port 31000
[Router (Python)] 2024-11-25 21:28:33 - INFO - Launching DP server process 1 on port 31814
[Router (Rust)] 2024-11-25 21:29:40 - INFO - Tenant: http://127.0.0.1:31814, Size: 0
[Router (Rust)] 2024-11-25 21:29:40 - INFO - Tenant: http://127.0.0.1:31000, Size: 0
[Router (Rust)] 2024-11-25 21:29:40 - INFO - Processed Queue: {"http://127.0.0.1:31000": 0, "http://127.0.0.1:31814": 0}
[Router (Rust)] 2024-11-25 21:29:40 - INFO - Running Queue: {"http://127.0.0.1:31814": 0, "http://127.0.0.1:31000": 0}
[Router (Rust)] 2024-11-25 21:29:55 - INFO - Before eviction - Used size per tenant:
[Router (Rust)] 2024-11-25 21:29:55 - INFO - Tenant: http://127.0.0.1:31814, Size: 0

Checklist