Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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 (optional)
# LOG_LEVEL=INFO

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

## Configuration

### Logging

DeepNext uses the [Loguru](https://loguru.readthedocs.io/) logger for output.
By default, the log level is set to `INFO` to reduce verbosity.
You can control the log verbosity by setting the `LOG_LEVEL` environment variable
in your `.env` file or in your environment. Supported values include `DEBUG`,
`INFO`, `WARNING`, `ERROR`, and `CRITICAL`.

Example:
```env
LOG_LEVEL=INFO
```
Set to `DEBUG` for more detailed logs, or `WARNING`/`ERROR` for less output.

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

load_monorepo_dotenv()
setup_logging()

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

load_monorepo_dotenv()
setup_logging()

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

from dotenv import load_dotenv
Expand All @@ -18,6 +20,14 @@ def load_monorepo_dotenv() -> None:
assert load_dotenv(path, verbose=True, override=True)


def setup_logging() -> None:
"""Configures Loguru logging level from LOG_LEVEL env variable (default INFO)."""
log_level = os.environ.get("LOG_LEVEL", "INFO").upper()
logger.remove()
logger.add(sys.stdout, level=log_level)
logger.debug(f"Loguru logging set to level: {log_level}")
Comment on lines +23 to +34

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change default log level to warning

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ DeepNext is applying Your suggestion(s)



def gitignore_name(name: str) -> str:
"""Converts the name so that it'll be ignored by git."""
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

load_monorepo_dotenv()
setup_logging()

cli()