Skip to content
Closed
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
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# OpenAI support (required)
OPENAI_API_KEY=sk-proj-qwertya

# Logging configuration
# LOG_LEVEL=INFO # Controls log verbosity: DEBUG, INFO, WARNING, ERROR. Defaults to INFO.

# VCS connector setup (required to connect core pipeline with VCS)
#VCS_PROVIDER=github
#VCS_ACCESS_TOKEN=<your Github access token>
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ Running as a service to automatically process issues:

## Configuration

### Logging

You can control the verbosity of DeepNext logs using the `LOG_LEVEL` environment variable in your `.env` file. Supported values are: `DEBUG`, `INFO`, `WARNING`, `ERROR`. If not set, the default log level is `INFO`.

Example:
```env
LOG_LEVEL=DEBUG
```

DeepNext supports multiple LLM providers:
- OpenAI
- AWS Bedrock (Claude, Mistral, and others)
Expand Down
3 changes: 2 additions & 1 deletion apps/app/deep_next/app/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ def main() -> None:


if __name__ == "__main__":
from deep_next.common.common import load_monorepo_dotenv
from deep_next.common.common import load_monorepo_dotenv, setup_logging_from_env

load_monorepo_dotenv()
setup_logging_from_env()

main()
3 changes: 2 additions & 1 deletion apps/app/deep_next/app/entrypoint_scheduled.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ def cli(interval_s: int):


if __name__ == "__main__":
from deep_next.common.common import load_monorepo_dotenv
from deep_next.common.common import load_monorepo_dotenv, setup_logging_from_env

load_monorepo_dotenv()
setup_logging_from_env()

cli()
8 changes: 8 additions & 0 deletions libs/common/deep_next/common/common.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
import textwrap
import os

from dotenv import load_dotenv
from loguru import logger


def setup_logging_from_env() -> None:
"""Configures loguru logger level from LOG_LEVEL env var (default: INFO)."""
log_level = os.environ.get("LOG_LEVEL", "INFO").upper()
logger.remove()
logger.add(lambda msg: print(msg, end=""), level=log_level)


def load_monorepo_dotenv() -> None:
"""Loads the .env file from the monorepo root."""
from deep_next.common.config import MONOREPO_ROOT_PATH
Expand Down
3 changes: 2 additions & 1 deletion libs/core/deep_next/core/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@ def cli(


if __name__ == "__main__":
from deep_next.common.common import load_monorepo_dotenv
from deep_next.common.common import load_monorepo_dotenv, setup_logging_from_env

load_monorepo_dotenv()
setup_logging_from_env()

cli()
Loading