Checkout: only customer fields on order updates, verified PayPal capture, safe logging #6

Merged
libretech merged 16 commits from fix/paypal-request-logging into main 2026-10-15 10:23:04 +02:00
Showing only changes of commit c560de8ec0 - Show all commits
+8 -1
View File
@@ -1,10 +1,17 @@
import { winston } from "@strapi/logger";
import { formatLogLine } from "../src/logging/format";
// Strapi 4.25 creates its logger from @strapi/logger's default configuration with this object assigned over it
// (Strapi.js: createLogger(this.config.get("logger"))). Its default level is "silly", which writes every line, also the debug and
// silly lines with order data such as names and addresses. Production (NODE_ENV=production in mp's compose.yml) writes info and
// above, any other environment debug and above.
const level = process.env.NODE_ENV === "production" ? "info" : "debug";
export default {
level,
transports: [
new winston.transports.Console({
format: winston.format.combine(winston.format.printf(formatLogLine))
format: winston.format.combine(winston.format.printf((info) => formatLogLine(info, { stack: level === "debug" })))
})
]
};