Skip to content

Commit 8b29986

Browse files
sthanikan2000ginaxu1gemini-code-assist[bot]
authored
[Audit Service] DB Config Priority and Doc Update (#419)
* Remove unused dotenv dependency and clean up test helper files * feat(database): Enhance database configuration handling and add support for PostgreSQL - Updated NewDatabaseConfig to prioritize database type and path settings. - Default to in-memory SQLite if no configuration is provided. - Added tests for various database configurations including in-memory, file-based SQLite, and PostgreSQL. - Introduced comprehensive API documentation for audit log operations. - Created architecture and database configuration documentation for better understanding of the service structure and setup. * Nits to #419 (#420) * Nits to #419 * Update audit-service/database/client.go Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update audit-service/database/client.go Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --------- Co-authored-by: ginaxu1 <167130561+ginaxu1@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 930e1b9 commit 8b29986

File tree

12 files changed

+1805
-320
lines changed

12 files changed

+1805
-320
lines changed

audit-service/.env.example

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ DB_TYPE=sqlite
2929

3030
# Path to SQLite database file (default: ./data/audit.db)
3131
# The directory will be created automatically if it doesn't exist
32+
# For in-memory database (no persistence, testing only), use: DB_PATH=:memory:
33+
# For file-based database: DB_PATH=./data/audit.db
3234
DB_PATH=./data/audit.db
3335

3436
# Maximum number of open database connections (default: 1 for SQLite)
@@ -88,3 +90,11 @@ DB_CONN_MAX_IDLE_TIME=15m
8890
# - Multiple origins: CORS_ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000
8991
# - Allow all: CORS_ALLOWED_ORIGINS=*
9092
CORS_ALLOWED_ORIGINS=http://localhost:5173
93+
94+
# =============================================================================
95+
# Logging Configuration
96+
# =============================================================================
97+
98+
# Log level: debug, info, warn, error (default: info)
99+
# Use "debug" for development, "info" or "warn" for production
100+
LOG_LEVEL=info

0 commit comments

Comments
 (0)