C# Listening to Warnings/Error Logs for Analytics

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mxkhronos

I’m trying to relay any warnings, errors that get logged to the output and debugger to a game analytics api. I’ve been looking at System.Diagnostics, Trace and GodotSharp’s GodotTraceListener which is added as a TraceListener to Trace, but I’ve no luck figuring out how to listen to any exceptions and errors.

I just need a way to get error messages with the StackTrace as string to log to analytics. I’ve already figure out how to log crashes with _Notification(int id), but that’s just for crashes it seems.

Additional Details: This is for a windows build, using GameAnalytics’s C# SDK.

I haven’t looked into this to see if this is possible. Perhaps one idea is to build the engine yourself and modify it to also leverage analytics and tracing.

spaceyjase | 2023-06-15 08:49