Skip to content

Commit 0d9a539

Browse files
Fix logging documentation (#226)
The logging documentation is buried in a code file, and it's wrong, so this PR corrects that. --------- Signed-off-by: Jared O'Connell <joconnel@redhat.com> Co-authored-by: Mark Kurtz <mark.j.kurtz@gmail.com>
1 parent e163dd5 commit 0d9a539

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

DEVELOPING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,20 @@ Reference [https://www.npmjs.com/package/jest-runner-groups](jest-runner-groups)
267267
*/
268268
```
269269

270+
### Logging
271+
272+
Logging is useful for learning how GuideLLM works and finding problems.
273+
274+
Logging is set using the following environment variables:
275+
276+
- `GUIDELLM__LOGGING__DISABLED`: Disable logging (default: false).
277+
- `GUIDELLM__LOGGING__CLEAR_LOGGERS`: Clear existing loggers from loguru (default: true).
278+
- `GUIDELLM__LOGGING__CONSOLE_LOG_LEVEL`: Log level for console logging (default: none, options: DEBUG, INFO, WARNING, ERROR, CRITICAL).
279+
- `GUIDELLM__LOGGING__LOG_FILE`: Path to the log file for file logging (default: guidellm.log if log file level set else none)
280+
- `GUIDELLM__LOGGING__LOG_FILE_LEVEL`: Log level for file logging (default: INFO if log file set else none).
281+
282+
If logging isn't responding to the environment variables, run the `guidellm config` command to validate that the environment variables match and are being set correctly.
283+
270284
## Additional Resources
271285

272286
- [CONTRIBUTING.md](https://github.com/neuralmagic/guidellm/blob/main/CONTRIBUTING.md): Guidelines for contributing to the project.

src/guidellm/logger.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@
99
- GUIDELLM__LOGGING__DISABLED: Disable logging (default: false).
1010
- GUIDELLM__LOGGING__CLEAR_LOGGERS: Clear existing loggers
1111
from loguru (default: true).
12-
- GUIDELLM__LOGGING__LOG_LEVEL: Log level for console logging
12+
- GUIDELLM__LOGGING__CONSOLE_LOG_LEVEL: Log level for console logging
1313
(default: none, options: DEBUG, INFO, WARNING, ERROR, CRITICAL).
14-
- GUIDELLM__LOGGING__FILE: Path to the log file for file logging
14+
- GUIDELLM__LOGGING__LOG_FILE: Path to the log file for file logging
1515
(default: guidellm.log if log file level set else none)
16-
- GUIDELLM__LOGGING__FILE_LEVEL: Log level for file logging
16+
- GUIDELLM__LOGGING__LOG_FILE_LEVEL: Log level for file logging
1717
(default: INFO if log file set else none).
1818
19+
If logging isn't responding to the environment variables, run the `guidellm config`
20+
command to validate that the environment variables match and are being set correctly.
21+
1922
Usage:
2023
from guidellm import logger, configure_logger, LoggerConfig
2124

0 commit comments

Comments
 (0)