Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 20s
- Add pino structured logging with request IDs (X-Request-Id header) - Add 30s timeout to acquirePage() and renderPdf/renderUrlPdf - Add verification cache cleanup (every 15min) and rate limit cleanup (every 60s) - Read version from package.json in health endpoint - Add compression middleware - Escape currency in templates (XSS fix) - Add static asset caching (1h maxAge) - Remove deprecated docker-compose version field - Replace all console.log/error with pino logger
10 lines
242 B
TypeScript
10 lines
242 B
TypeScript
import pino from "pino";
|
|
|
|
const logger = pino({
|
|
level: process.env.LOG_LEVEL || "info",
|
|
...(process.env.NODE_ENV !== "production" && {
|
|
transport: { target: "pino/file", options: { destination: 1 } },
|
|
}),
|
|
});
|
|
|
|
export default logger;
|