Skip to content

Commit

Permalink
Set correct application log level based on config (#32)
Browse files Browse the repository at this point in the history
* Set correct log level based on config

* Moved log configuration to workflow_server
  • Loading branch information
nschenone authored Oct 14, 2024
1 parent 9a61420 commit 8bb5e82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion genai_factory/src/genai_factory/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

import click
import dotenv
from genai_factory.api import router

from genai_factory import WorkflowServerConfig
from genai_factory.api import router

# Load the environment variables:
dotenv.load_dotenv(os.environ.get("GENAI_FACTORY_ENV_PATH", "./.env"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def _set_controller_client(self):

def set_config(self, config: WorkflowServerConfig):
self._config = config
logger.setLevel(config.log_level.upper())
# reinitialize the controller client with the new config
self._set_controller_client()
self._session_store = SessionStore(self._controller_client)
Expand Down

0 comments on commit 8bb5e82

Please sign in to comment.