Skip to content

Commit 2eb752e

Browse files
committed
First commit...
1 parent 1b03600 commit 2eb752e

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

.env.example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# ----------------------------------------------------------------------------
22
# SQLITE BUSINESS EVENT LOGGER CONFIGURATION
33
# ----------------------------------------------------------------------------
4-
BUSINESS_LOGGER_ENABLED=false
4+
SQLITE_BUSINESS_LOGGER_ENABLED=false
55
# Path to the SQLite database file for business events
6-
BUSINESS_LOGGER_DB_FILE=./logs/business_events.db
6+
SQLITE_BUSINESS_LOGGER_DB_FILE=./logs/business_events.db
77
# Table name for business events
8-
BUSINESS_LOGGER_TABLE_NAME=business_events
8+
SQLITE_BUSINESS_LOGGER_TABLE_NAME=business_events
99

1010
# ----------------------------------------------------------------------------
1111
# JSON BUSINESS EVENT LOGGER CONFIGURATION

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ L'installation est simplifiée grâce au `Makefile` fourni.
3737
# .env
3838

3939
# Activer le logger SQLite
40-
BUSINESS_LOGGER_ENABLED=true
41-
BUSINESS_LOGGER_DB_FILE=./logs/business_events.db
40+
SQLITE_BUSINESS_LOGGER_ENABLED=true
41+
SQLITE_BUSINESS_LOGGER_DB_FILE=./logs/business_events.db
4242

4343
# Activer le logger JSON
4444
JSON_BUSINESS_LOGGER_ENABLED=true

src/busylogger/sqlite_business_logger.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ def logger_name(self) -> str:
1414

1515
@property
1616
def enabled_env_var(self) -> str:
17-
return "BUSINESS_LOGGER_ENABLED"
17+
return "SQLITE_BUSINESS_LOGGER_ENABLED"
1818

1919
@property
2020
def db_file_env_var(self) -> str:
21-
return "BUSINESS_LOGGER_DB_FILE"
21+
return "SQLITE_BUSINESS_LOGGER_DB_FILE"
2222

2323
def _setup_backend(self, db_file: str) -> bool:
2424
"""
2525
Cette méthode s'assure que le répertoire et la table existent,
2626
mais n'ouvre pas de connexion persistante.
2727
"""
2828
self.db_file = db_file
29-
self.table_name = os.getenv("BUSINESS_LOGGER_TABLE_NAME", "business_events")
29+
self.table_name = os.getenv("SQLITE_BUSINESS_LOGGER_TABLE_NAME", "business_events")
3030
self.conn = None
3131
try:
3232
os.makedirs(os.path.dirname(self.db_file), exist_ok=True)

tests/test_loggers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ def setup_env_vars(tmp_path, monkeypatch):
2222
db_file = tmp_path / "test_events.db"
2323
json_file = tmp_path / "test_events.json"
2424

25-
monkeypatch.setenv("BUSINESS_LOGGER_ENABLED", "true")
26-
monkeypatch.setenv("BUSINESS_LOGGER_DB_FILE", str(db_file))
25+
monkeypatch.setenv("SQLITE_BUSINESS_LOGGER_ENABLED", "true")
26+
monkeypatch.setenv("SQLITE_BUSINESS_LOGGER_DB_FILE", str(db_file))
2727
monkeypatch.setenv("JSON_BUSINESS_LOGGER_ENABLED", "true")
2828
monkeypatch.setenv("JSON_BUSINESS_LOGGER_DB_FILE", str(json_file))
2929

0 commit comments

Comments
 (0)