@@ -927,14 +927,23 @@ async function writeUtpTelemetryLog(filePath: string, entries: UTP[], logger: Lo
927927/**
928928 * Editor log messages whose severity has been changed.
929929 * Useful for making certain error messages that are not critical less noisy.
930- * Key is the exact log message, value is the remapped LogLevel.
930+ * Key is a substring of the log message, value is the remapped LogLevel.
931931 */
932932const remappedEditorLogs : Record < string , LogLevel > = {
933933 'OpenCL device, baking cannot use GPU lightmapper.' : LogLevel . INFO ,
934934 'Failed to find a suitable OpenCL device, baking cannot use GPU lightmapper.' : LogLevel . INFO ,
935935 '~StackAllocator(ALLOC_TEMP_MAIN) m_LastAlloc not NULL. Did you forget to call FreeAllStackAllocations()?' : LogLevel . INFO ,
936936} ;
937937
938+ function getRemappedEditorLogLevel ( message : string ) : LogLevel | undefined {
939+ for ( const [ fragment , level ] of Object . entries ( remappedEditorLogs ) ) {
940+ if ( message . includes ( fragment ) ) {
941+ return level ;
942+ }
943+ }
944+ return undefined ;
945+ }
946+
938947/**
939948 * Tails a log file using fs.watch and ReadStream for efficient reading.
940949 * @param logPath The path to the log file to tail.
@@ -993,8 +1002,9 @@ export function TailLogFile(logPath: string, projectPath: string | undefined): L
9931002 ( utp . severity === Severity . Error || utp . severity === Severity . Exception || utp . severity === Severity . Assert ) ) {
9941003 let messageLevel : LogLevel = LogLevel . ERROR ;
9951004
996- if ( remappedEditorLogs [ utp . message ] !== undefined ) {
997- messageLevel = remappedEditorLogs [ utp . message ] as LogLevel ;
1005+ const remappedLevel = getRemappedEditorLogLevel ( utp . message ) ;
1006+ if ( remappedLevel !== undefined ) {
1007+ messageLevel = remappedLevel ;
9981008 }
9991009
10001010 const file = utp . file ? utp . file . replace ( / \\ / g, '/' ) : undefined ;
0 commit comments