fix: Improve logging - fix LOG_LEVEL filter, reduce HTTP noise

- Fix LOG_LEVEL filtering logic (was inverted)
- HTTP logs now only show errors (4xx, 5xx) by default
- Add database connection check at startup
- Cron jobs logged on separate lines
- LOG_LEVEL=debug shows all HTTP requests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
richardtekula
2025-12-17 09:54:07 +01:00
parent 095a3a5b03
commit 3cd2531f6b
5 changed files with 49 additions and 27 deletions

View File

@@ -24,5 +24,12 @@ pool.on('error', (err) => {
// Initialize Drizzle ORM with schema
export const db = drizzle(pool, { schema });
// Test database connection
export const testConnection = async () => {
const client = await pool.connect();
client.release();
return true;
};
// Export pool for direct access if needed
export { pool };