From 4371c4d2c9bd23e947b743d205523428ce70fda9 Mon Sep 17 00:00:00 2001 From: Matt Larsen Date: Mon, 16 Sep 2024 06:44:26 +0200 Subject: [PATCH] filter out more messages --- games/carbon/wrapper.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/games/carbon/wrapper.js b/games/carbon/wrapper.js index 1bb43fe..f80acca 100644 --- a/games/carbon/wrapper.js +++ b/games/carbon/wrapper.js @@ -24,16 +24,22 @@ const seenPercentage = {}; function filter(data) { const str = data.toString(); - if (str.startsWith("Fallback handler could not load library")) return; // Remove fallback - if (str.includes("Filename:")) return; //Remove bindings.h - if (str.includes("ERROR: Shader ")) return; //Remove shader errors - if (str.includes("WARNING: Shader ")) return; //Remove shader warnings - if (str.startsWith("Loading Prefab Bundle ")) { // Filter duplicate percentages + + // Filters for specific log messages + if (str.startsWith("Fallback handler could not load library")) return; // Remove fallback handler messages + if (str.includes("Filename:")) return; // Remove bindings.h errors + if (str.includes("ERROR: Shader ")) return; // Remove shader errors + if (str.includes("WARNING: Shader ")) return; // Remove shader warnings + if (str.includes("The referenced script on this Behaviour")) return; // Remove specific Behaviour script errors + if (str.includes("RuntimeNavMeshBuilder:")) return; // Remove RuntimeNavMeshBuilder messages + if (str.startsWith("Loading Prefab Bundle ")) { // Rust spams the same percentage, filter out duplicates const percentage = str.substr("Loading Prefab Bundle ".length); if (seenPercentage[percentage]) return; seenPercentage[percentage] = true; } - console.log(str); // Continue logging everything + + // Output the remaining logs + console.log(str); } var exec = require("child_process").exec; @@ -135,4 +141,4 @@ var poll = function () { } }); } -poll(); +poll(); \ No newline at end of file