Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,20 @@ Reference [https://www.npmjs.com/package/jest-runner-groups](jest-runner-groups)
*/
```

### Logging

Logging is useful for learning how GuideLLM works and finding problems.

Logging is set using the following environment variables:

- `GUIDELLM__LOGGING__DISABLED`: Disable logging (default: false).
- `GUIDELLM__LOGGING__CLEAR_LOGGERS`: Clear existing loggers from loguru (default: true).
- `GUIDELLM__LOGGING__CONSOLE_LOG_LEVEL`: Log level for console logging (default: none, options: DEBUG, INFO, WARNING, ERROR, CRITICAL).
- `GUIDELLM__LOGGING__LOG_FILE`: Path to the log file for file logging (default: guidellm.log if log file level set else none)
- `GUIDELLM__LOGGING__LOG_FILE_LEVEL`: Log level for file logging (default: INFO if log file set else none).

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.

## Additional Resources

- [CONTRIBUTING.md](https://github.com/neuralmagic/guidellm/blob/main/CONTRIBUTING.md): Guidelines for contributing to the project.
Expand Down
9 changes: 6 additions & 3 deletions src/guidellm/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@
- GUIDELLM__LOGGING__DISABLED: Disable logging (default: false).
- GUIDELLM__LOGGING__CLEAR_LOGGERS: Clear existing loggers
from loguru (default: true).
- GUIDELLM__LOGGING__LOG_LEVEL: Log level for console logging
- GUIDELLM__LOGGING__CONSOLE_LOG_LEVEL: Log level for console logging
(default: none, options: DEBUG, INFO, WARNING, ERROR, CRITICAL).
- GUIDELLM__LOGGING__FILE: Path to the log file for file logging
- GUIDELLM__LOGGING__LOG_FILE: Path to the log file for file logging
(default: guidellm.log if log file level set else none)
- GUIDELLM__LOGGING__FILE_LEVEL: Log level for file logging
- GUIDELLM__LOGGING__LOG_FILE_LEVEL: Log level for file logging
(default: INFO if log file set else none).

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.

Usage:
from guidellm import logger, configure_logger, LoggerConfig

Expand Down