Skip to content

Commit d118c81

Browse files
committed
Added DebugLogManager.GetAllLogs function overload that returns raw logs so that they can be processed or saved in custom C# scripts
1 parent 3980ef3 commit d118c81

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Plugins/IngameDebugConsole/Scripts/DebugLogManager.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1797,6 +1797,14 @@ public string GetAllLogs()
17971797
return sb.ToString();
17981798
}
17991799

1800+
/// <param name="logTimestamps">Is <c>null</c> if <see cref="captureLogTimestamps"/> is <c>false</c>. Indices are in sync with <paramref name="logEntries"/>.</param>
1801+
/// <remarks>You mustn't modify the returned buffers in any way.</remarks>
1802+
public void GetAllLogs( out DynamicCircularBuffer<DebugLogEntry> logEntries, out DynamicCircularBuffer<DebugLogEntryTimestamp> logTimestamps )
1803+
{
1804+
logEntries = uncollapsedLogEntries;
1805+
logTimestamps = uncollapsedLogEntriesTimestamps;
1806+
}
1807+
18001808
public void SaveLogsToFile()
18011809
{
18021810
SaveLogsToFile( Path.Combine( Application.persistentDataPath, System.DateTime.Now.ToString( "dd-MM-yyyy--HH-mm-ss" ) + ".txt" ) );

0 commit comments

Comments
 (0)