Update TypeScript configuration for stricter type checks and modify environment variable access. Exclude additional directories from compilation, enhance error handling in resolvers, and improve random element selection in mock data generation. Refactor locale handling in middleware and update GraphQL client to use bracket notation for environment variables.
This commit is contained in:
@@ -5,7 +5,7 @@ import winston from "winston";
|
||||
* Erstellt JSON-Logs für bessere Analyse und Monitoring
|
||||
*/
|
||||
export const logger = winston.createLogger({
|
||||
level: process.env.LOG_LEVEL || "info",
|
||||
level: process.env["LOG_LEVEL"] || "info",
|
||||
format: winston.format.combine(
|
||||
winston.format.timestamp(),
|
||||
winston.format.errors({ stack: true }),
|
||||
@@ -13,7 +13,7 @@ export const logger = winston.createLogger({
|
||||
),
|
||||
defaultMeta: {
|
||||
service: "graphql-middlelayer",
|
||||
environment: process.env.NODE_ENV || "development",
|
||||
environment: process.env["NODE_ENV"] || "development",
|
||||
},
|
||||
transports: [
|
||||
// Console Output (für Development)
|
||||
@@ -29,7 +29,7 @@ export const logger = winston.createLogger({
|
||||
),
|
||||
}),
|
||||
// File Output (für Production)
|
||||
...(process.env.NODE_ENV === "production"
|
||||
...(process.env["NODE_ENV"] === "production"
|
||||
? [
|
||||
new winston.transports.File({
|
||||
filename: "logs/error.log",
|
||||
|
||||
Reference in New Issue
Block a user