Cysharp / ZLogger

Zero Allocation Text/Structured Logger for .NET with StringInterpolation and Source Generator, built on top of a Microsoft.Extensions.Logging.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Unity logger does not allow to provide a context object

VacuumBreather opened this issue · comments

Unity's Debug.Log methods allow the passing of a context GameObject. Whenever such a log message is clicked the appropriate object in the scene hierarchy is highlighted.
The current implementation of the Unity logger in ZLogger does provide and API to pass such a context.

+1 it would be very useful to have this please

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Commenting to reopen, feels pretty important.

Unfortunately, it seems difficult to support.

Note:.
In ZLogger, the parameters passed to the logger are held by generics that exist for each number of parameters. Therefore, there is no way to transparently scan parameters on the UnityDebugLogProcessor side.