{"id":"e4e419f09a87ac90","repo":"webpack/webpack","slug":"logger-getchildlogger-name-called-with-a-function-e4e419","errorCode":null,"errorMessage":"Logger.getChildLogger(name) called with a function not returning a name","messagePattern":"Logger\\.getChildLogger\\(name\\) called with a function not returning a name","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"lib/Compiler.js","lineNumber":444,"sourceCode":"\t\t\t\t\tthis.infrastructureLogger(name, type, args);\n\t\t\t\t}\n\t\t\t},\n\t\t\t(childName) => {\n\t\t\t\tif (typeof name === \"function\") {\n\t\t\t\t\tif (typeof childName === \"function\") {\n\t\t\t\t\t\treturn this.getInfrastructureLogger(() => {\n\t\t\t\t\t\t\tif (typeof name === \"function\") {\n\t\t\t\t\t\t\t\tname = name();\n\t\t\t\t\t\t\t\tif (!name) {\n\t\t\t\t\t\t\t\t\tthrow new TypeError(\n\t\t\t\t\t\t\t\t\t\t\"Compiler.getInfrastructureLogger(name) called with a function not returning a name\"\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (typeof childName === \"function\") {\n\t\t\t\t\t\t\t\tchildName = childName();\n\t\t\t\t\t\t\t\tif (!childName) {\n\t\t\t\t\t\t\t\t\tthrow new TypeError(\n\t\t\t\t\t\t\t\t\t\t\"Logger.getChildLogger(name) called with a function not returning a name\"\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn `${name}/${childName}`;\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\treturn this.getInfrastructureLogger(() => {\n\t\t\t\t\t\tif (typeof name === \"function\") {\n\t\t\t\t\t\t\tname = name();\n\t\t\t\t\t\t\tif (!name) {\n\t\t\t\t\t\t\t\tthrow new TypeError(\n\t\t\t\t\t\t\t\t\t\"Compiler.getInfrastructureLogger(name) called with a function not returning a name\"\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn `${name}/${childName}`;\n\t\t\t\t\t});","sourceCodeStart":426,"sourceCodeEnd":462,"githubUrl":"https://github.com/webpack/webpack/blob/318421ea8ac81371f5171236a6efb63675576528/lib/Compiler.js#L426-L462","documentation":"Error \"Logger.getChildLogger(name) called with a function not returning a name\" thrown in webpack/webpack.","triggerScenarios":"Thrown at lib/Compiler.js:444 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the function passed to logger.getChildLogger returns a non-empty string name, or pass the name string directly."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"318421ea8ac81371f5171236a6efb63675576528","analyzedAt":"2026-08-03T19:39:56.731Z","schemaVersion":2}