MCPcopy Create free account
hub / github.com/firebase/firebase-tools / useFileLogger

Function useFileLogger

src/logger.ts:185–198  ·  view source on GitHub ↗
(logFile?: string)

Source from the content-addressed store, hash-verified

183 * Sets up logging to the firebase-debug.log file.
184 */
185export function useFileLogger(logFile?: string): string {
186 const logFileName = logFile ?? findAvailableLogFile();
187 logger.add(
188 new winston.transports.File({
189 level: "debug",
190 filename: logFileName,
191 format: winston.format.printf((info) => {
192 const segments = [info.message, ...(info[SPLAT] || [])].map(tryStringify);
193 return `[${info.level}] ${stripVTControlCharacters(segments.join(" "))}`;
194 }),
195 }),
196 );
197 return logFileName;
198}
199
200/**
201 * Sets up logging to the command line.

Callers 3

mcpFunction · 0.90
cliFunction · 0.90
logSetupFunction · 0.90

Calls 2

findAvailableLogFileFunction · 0.85
addMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…