- Home /
Webplayer Log output missing stacktrace.
I'm working on a tool that captures log output in game and allows it to be saved to file. It's all working correctly, except for the log output does not include stacktraces when run from Webplayer. The stacktrace is captured for exceptions, but not for normal logs. If I run from the editor in Webplayer mode, I can see the stacktraces are captured, but as soon as I build it and run it as the webplayer the stacktraces disappear. Standalone works as expected with the same code for capturing the logs.
Is there a reason for this, and is there any way I can force the stacktraces to be included in the Webplayer? The tool is a bug reporter, so the stacktraces are helpful in determining where in the code things are breaking.
Examples:
Webplayer log capture:
[LOG];4/29/2013 1:40:03 AM +0000;0
[LOG];4/29/2013 1:40:03 AM +0000;1
[LOG];4/29/2013 1:40:03 AM +0000;2
[LOG];4/29/2013 1:40:03 AM +0000;3
[LOG];4/29/2013 1:40:03 AM +0000;4
[EXCEPTION];4/29/2013 1:40:03 AM +0000;IndexOutOfRangeException: Array index is out of range.
FUBARTester.BreakLog ()
FUBARTester.Start ()
Standalone Log Capture:
[LOG];4/29/2013 1:40:42 AM +0000;0
UnityEngine.Debug:Log(Object)
FUBARTester:BreakLog() (at C:/Users/Public/Documents/Unity Projects/FUBAR/Assets/FUBAR/FUBAR Scripts/FUBARTester.cs:32)
FUBARTester:Start() (at C:/Users/Public/Documents/Unity Projects/FUBAR/Assets/FUBAR/FUBAR Scripts/FUBARTester.cs:16)
[LOG];4/29/2013 1:40:42 AM +0000;1
UnityEngine.Debug:Log(Object)
FUBARTester:BreakLog() (at C:/Users/Public/Documents/Unity Projects/FUBAR/Assets/FUBAR/FUBAR Scripts/FUBARTester.cs:32)
FUBARTester:Start() (at C:/Users/Public/Documents/Unity Projects/FUBAR/Assets/FUBAR/FUBAR Scripts/FUBARTester.cs:16)
[LOG];4/29/2013 1:40:42 AM +0000;2
UnityEngine.Debug:Log(Object)
FUBARTester:BreakLog() (at C:/Users/Public/Documents/Unity Projects/FUBAR/Assets/FUBAR/FUBAR Scripts/FUBARTester.cs:32)
FUBARTester:Start() (at C:/Users/Public/Documents/Unity Projects/FUBAR/Assets/FUBAR/FUBAR Scripts/FUBARTester.cs:16)
[LOG];4/29/2013 1:40:42 AM +0000;3
UnityEngine.Debug:Log(Object)
FUBARTester:BreakLog() (at C:/Users/Public/Documents/Unity Projects/FUBAR/Assets/FUBAR/FUBAR Scripts/FUBARTester.cs:32)
FUBARTester:Start() (at C:/Users/Public/Documents/Unity Projects/FUBAR/Assets/FUBAR/FUBAR Scripts/FUBARTester.cs:16)
[LOG];4/29/2013 1:40:42 AM +0000;4
UnityEngine.Debug:Log(Object)
FUBARTester:BreakLog() (at C:/Users/Public/Documents/Unity Projects/FUBAR/Assets/FUBAR/FUBAR Scripts/FUBARTester.cs:32)
FUBARTester:Start() (at C:/Users/Public/Documents/Unity Projects/FUBAR/Assets/FUBAR/FUBAR Scripts/FUBARTester.cs:16)
[EXCEPTION];4/29/2013 1:40:42 AM +0000;IndexOutOfRangeException: Array index is out of range.
FUBARTester.BreakLog () (at C:/Users/Public/Documents/Unity Projects/FUBAR/Assets/FUBAR/FUBAR Scripts/FUBARTester.cs:31)
FUBARTester.Start () (at C:/Users/Public/Documents/Unity Projects/FUBAR/Assets/FUBAR/FUBAR Scripts/FUBARTester.cs:16)
Answer by delVhar · May 06, 2013 at 08:54 AM
I found the cause of this problem was that the Webplayer was not running as a development release, even though I built it as one.
Change the release channel with the context menu made the logs show correctly.
If anyone is aware of a way to get the full logs on a non-development build it would be much appreciated.