Add Telemetry (#704)

This commit is contained in:
Brahim Hadriche authored and GitHub committed 2025-08-29 15:22:57 -04:00
1 parent 92789b0566
commit b657664546
14 files changed
+186 -2

No files matched your search

+5 -1
View File
@@ -180,6 +180,8 @@ export class LoggerPlugin implements CompilerPlugin {
let logLine = '';
const telemetryEnabled = level === 'LogError' || level === 'LogWarn';
if (isDebug) {
const RED = '[31m';
const YELLOW = '[33m';
@@ -217,7 +219,9 @@ function ${newFunctionName}(${args.join(', ')}) as void
if logger.logLevel < ${func.level}
return
end if
logger.logLine = ${logLine}
line = ${logLine}
logger.logLine = line
${(telemetryEnabled ? `m.global.telemetry.${level} = line` : '')}
end function
`;
}