praydog / UEVR

Universal Unreal Engine VR Mod (4.8 - 5.4)
http://uevr.io
3.08k stars 158 forks source link

Override default log level #134

Closed mrbelowski closed 8 months ago

mrbelowski commented 9 months ago

The default log level is 'INFO'. This can result in some very large logs, depending on the game and the config - e.g.

[2024-01-05 16:46:36.109] [UnrealVR] [info] [FFakeStereoRenderingHook.cpp:4813] No UI target, skipping! [2024-01-05 16:46:36.109] [UnrealVR] [info] [FFakeStereoRenderingHook.cpp:4813] No UI target, skipping! [2024-01-05 16:46:36.110] [UnrealVR] [info] [FFakeStereoRenderingHook.cpp:4813] No UI target, skipping! [2024-01-05 16:46:36.110] [UnrealVR] [info] [FFakeStereoRenderingHook.cpp:4813] No UI target, skipping! [2024-01-05 16:46:36.110] [UnrealVR] [info] [FFakeStereoRenderingHook.cpp:4813] No UI target, skipping! [2024-01-05 16:46:36.111] [UnrealVR] [info] [FFakeStereoRenderingHook.cpp:4813] No UI target, skipping!

(ghost runner)

There are other examples where the logger is spamming but the game appears to be working OK. Lots of the INFO level logs are useful and informative but some are logging the same thing on every tick.

It would be nice to have a selectable component in the UI where the level could be set (drop down list or whatever). Failing that, can we make the default level WARN?

praydog commented 9 months ago

This particular log can just be modified to a SPDLOG_INFO_EVERY_N_SEC call

mrbelowski commented 9 months ago

There are a few more places -

[2024-01-08 13:30:11.259] [UnrealVR] [info] [FFakeStereoRenderingHook.cpp:2072] [A3] Function index 6 Found frame count offset at 58 (17) [2024-01-08 13:30:11.259] [UnrealVR] [info] [FFakeStereoRenderingHook.cpp:2014] [A2] Function index 3 Found frame count offset at 38, (17) [2024-01-08 13:30:11.259] [UnrealVR] [info] [FFakeStereoRenderingHook.cpp:2014] [A2] Function index 5 Found frame count offset at 58, (18) [2024-01-08 13:30:11.259] [UnrealVR] [info] [FFakeStereoRenderingHook.cpp:2072] [A3] Function index 9 Found frame count offset at 58 (17)

[2024-01-08 13:29:59.407] [UnrealVR] [info] [FFakeStereoRenderingHook.cpp:4800] No UI target, skipping! [2024-01-08 13:29:59.407] [UnrealVR] [info] [FFakeStereoRenderingHook.cpp:4800] No UI target, skipping! [2024-01-08 13:29:59.407] [UnrealVR] [info] [FFakeStereoRenderingHook.cpp:4800] No UI target, skipping!

[2024-01-12 20:02:50.555] [UnrealVR] [info] VR: Unknown event: 1700 [2024-01-12 20:02:50.555] [UnrealVR] [info] VR: Unknown event: 1700 (I think this one's in OpenVR.cpp, line 155)

There are some in OpenXR.cpp too, will get details shortly

praydog commented 9 months ago

I think those particular ones with the function index are not an issue and are only done once during the initialization phase. They will be useful for diagnosing issues with any scans.

mrbelowski commented 9 months ago

Jedi Fallen Order spams this while in the main menu:

[2024-01-15 12:26:06.105] [UnrealVR] [info] Setting up texture context for Backbuffer [2024-01-15 12:26:06.105] [UnrealVR] [info] Creating RTV for texture context [2024-01-15 12:26:06.105] [UnrealVR] [info] Creating SRV for texture context [2024-01-15 12:26:06.105] [UnrealVR] [info] [VR] Created backbuffer RTV (D3D12) [2024-01-15 12:26:06.105] [UnrealVR] [info] Frame already began, skipping xrWaitFrame call. [2024-01-15 12:26:06.105] [UnrealVR] [info] [FFakeStereoRenderingHook.cpp:4829] No UI target, skipping!

mechWarrior spams this:

[2024-01-10 21:23:07.260] [UnrealVR] [info] [VR] Already acquired textures for swapchain 4? [2024-01-10 21:23:07.273] [UnrealVR] [info] [VR] Already acquired textures for swapchain 4? [2024-01-10 21:23:07.286] [UnrealVR] [info] [VR] Already acquired textures for swapchain 4? [2024-01-10 21:23:07.298] [UnrealVR] [info] [VR] Already acquired textures for swapchain 4? [2024-01-10 21:23:07.310] [UnrealVR] [info] [VR] Already acquired textures for swapchain 4?

praydog commented 9 months ago

That mechwarrior one seems like an actual bug, weird

With UEVR, not the logging

mrbelowski commented 9 months ago

not reproduced the MechWarrior log - just entering into a 'normal' game doesn't trigger it. I'll look again later - perhaps it's triggered by some action like zooming

mrbelowski commented 9 months ago

added a quick PR to allow log level to be set in the UI

https://github.com/praydog/UEVR/pull/135