Skip to content

Commit

Permalink
Minor fixes/changes to logging (#46)
Browse files Browse the repository at this point in the history
* Add missing arg2 to console mirror in LogEmitter

* Replace open folder function with a cross-platform alternative
  • Loading branch information
nsalminen authored Jan 16, 2024
1 parent 306ddd7 commit 8517be2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Unity/Assets/Editor/Logging/LogCollectorEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ public override void OnInspectorGUI()
if (GUILayout.Button("Open Folder"))
{
var path = Application.persistentDataPath;
path = path.Replace("/","\\");
System.Diagnostics.Process.Start("explorer.exe", path);
Debug.Log($"Opening {path} in file explorer");
EditorUtility.RevealInFinder(path);
}
}
}
}
}
2 changes: 1 addition & 1 deletion Unity/Assets/Runtime/Logging/LogEmitter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public void Log<T1, T2>(string Event, T1 arg1, T2 arg2)
}
if (mirrorToConsole)
{
Debug.Log(String.Format("{0} {1}", Event, arg1));
Debug.Log(String.Format("{0} {1} {2}", Event, arg1, arg2));
}
}

Expand Down

0 comments on commit 8517be2

Please sign in to comment.