MCPcopy Index your code
hub / github.com/simstudioai/sim / getLogConfig

Function getLogConfig

packages/logger/src/index.ts:85–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83 * Configuration for different environments
84 */
85const getLogConfig = () => {
86 const nodeEnv = getNodeEnv()
87 const minLevel = getMinLogLevel()
88
89 switch (nodeEnv) {
90 case 'development':
91 return {
92 enabled: true,
93 minLevel,
94 colorize: true,
95 }
96 case 'production':
97 return {
98 enabled: true,
99 minLevel,
100 colorize: false,
101 }
102 case 'test':
103 return {
104 enabled: false,
105 minLevel,
106 colorize: false,
107 }
108 default:
109 return {
110 enabled: true,
111 minLevel,
112 colorize: true,
113 }
114 }
115}
116
117/**
118 * Format objects for logging

Callers 1

constructorMethod · 0.85

Calls 2

getNodeEnvFunction · 0.85
getMinLogLevelFunction · 0.85

Tested by

no test coverage detected