MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / createLogger

Function createLogger

packages/config/src/migrations/auth-profiles.test.ts:19–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17const aiDataDir = join(chatlabDir, 'ai')
18
19function createLogger() {
20 const infos: string[] = []
21 const warnings: string[] = []
22 const errors: string[] = []
23
24 return {
25 infos,
26 warnings,
27 errors,
28 logger: {
29 info(_category: string, message: string) {
30 infos.push(message)
31 },
32 warn(_category: string, message: string) {
33 warnings.push(message)
34 },
35 error(_category: string, message: string) {
36 errors.push(message)
37 },
38 },
39 }
40}
41
42async function writeLlmConfig(configs: Array<Record<string, unknown>>): Promise<void> {
43 await mkdir(aiDataDir, { recursive: true })

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected