Debug.LogWarning and Debug.LogError already do that. What I do end up doing is that I almost always try to standardize putting the name of the system or script file at the beginning of the log message in brackets, like [WebsocketManager] or [EnemyBehavior] so I can identify it in build logs.
Comments
Passing the class names in the logs is a good idea!
Here it is in-engine when I make them spawn, so as you can see they do use Log, LogWarning and LogError, and I feel they're more convenient to read (but that's personal taste)!