Adam Stepinski Posted August 23, 2022 Share Posted August 23, 2022 How can you disable logging from ViveSDK in Unity? Link to comment Share on other sites More sharing options...
VIVE_chengnay Posted August 23, 2022 Share Posted August 23, 2022 Hi @Adam Stepinski, What type of logging are you referring to? Link to comment Share on other sites More sharing options...
Adam Stepinski Posted August 23, 2022 Author Share Posted August 23, 2022 (edited) When running the app (in both Editor and Focus 3), console is quickly filled with logs I tried disabling them using Override LogFlag (cleared all matrix squares), but it didn't work Edited August 23, 2022 by Adam Stepinski cosmetic Link to comment Share on other sites More sharing options...
VIVE_chengnay Posted August 23, 2022 Share Posted August 23, 2022 Hi @Adam Stepinski, Which Unity Editor version are you using? I think you can try using keyword to filter the console log. Link to comment Share on other sites More sharing options...
Adam Stepinski Posted August 23, 2022 Author Share Posted August 23, 2022 it's 2021.3.5f1 Link to comment Share on other sites More sharing options...
Fil Posted August 26, 2022 Share Posted August 26, 2022 I'm also interested in a solution to disable these logs. And please no, filtering the logs is not a solution 🙂 FYI: In my case, the logs are only shown in the editor. I built an "in scene" log console in my app and the wave related logs are not showing up, when running on the Focus 3. 1 Link to comment Share on other sites More sharing options...
Fil Posted August 30, 2022 Share Posted August 30, 2022 Some news about this topic? If the disabling of the logs is not possible today, could you inform us, if this option is planned in the next wave SDK release? Link to comment Share on other sites More sharing options...
FunSTW Posted May 3, 2023 Share Posted May 3, 2023 same here. I am currently developing with cross-device I'm getting tired of the many logs being printed when i not using Vive... Is it possible to have an option to turn off the logs? Link to comment Share on other sites More sharing options...
HCI87239432 Posted June 23, 2023 Share Posted June 23, 2023 Good News! A simple but effective solution is to override the default Unity's Debug.Log ILogHandler with your own. Attach this script to a game object in the scene and adjust the keywords according to your needs 🙂  using System; using UnityEngine; #if UNITY_EDITOR using UnityEditor; #endif #if UNITY_EDITOR [InitializeOnLoad] #endif public class LogHandlerManager : MonoBehaviour { private static string[] keywords ={ "Wave", "Essense", "PackageInfo()", "InteractionModeManagerSettings" }; private static LogHandler logHandler; static LogHandlerManager() { logHandler = new LogHandler(); logHandler.keywords = keywords; Debug.unityLogger.logHandler = logHandler; } } public class LogHandler : ILogHandler { public string[] keywords; private static ILogHandler unityLogHandler = Debug.unityLogger.logHandler; public void LogException(Exception exception, UnityEngine.Object context) { unityLogHandler.LogException(exception, context); } public void LogFormat(LogType logType, UnityEngine.Object context, string format, params object[] args) { if (Application.isEditor) { foreach (string formatString in args) foreach (var keyword in keywords) if (formatString.Contains(keyword, StringComparison.OrdinalIgnoreCase)) return; } unityLogHandler.LogFormat(logType, context, format, args); } }  Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now