MCPcopy Create free account
hub / github.com/api3dao/airnode / setLogsDirectory

Function setLogsDirectory

packages/airnode-deployer/src/utils/logger.ts:187–197  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

185}
186
187export function setLogsDirectory(path: string) {
188 logsDirectory = path;
189
190 const goOutputWritable = goSync(() => fs.accessSync(logsDirectory, fs.constants.W_OK));
191 if (!goOutputWritable.success) {
192 const goMkdir = goSync(() => fs.mkdirSync(logsDirectory, { recursive: true }));
193 if (!goMkdir.success) throw new Error(`Failed to create logs output directory. Error: ${goMkdir.error}.`);
194 }
195
196 logFileTimestamp = format(Date.now(), 'yyyy-MM-dd_HH:mm:ss');
197}

Callers 3

index.test.tsFile · 0.90
aws.test.tsFile · 0.90
gcp.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected