OK - somewhat special case I admit, but anyways.
I am having some scripts that do not use UnityEngine, but straight up C# (e.g. from my SFS client DLL)
How can I write errors and warnings into the player.log file?
I’ve been trying to use simple Console.Error.WriteLine, but nothing shows up.
(Sorry if this is a n00b or RTFM question)
E.g. writing a dll for usage in “regular” .NET programs, where running it inside Unity is “just” one use case (although my main reason).
I’d make unity a specific build target for your code then. Add UnityEngine.dll as dependency and #define UNITY which would cause your code to be using UnityEngine; and use Debug.Log in stead of Console.WriteLine.
Hello,
there is was an article written by Jashan Chittesh, about log4net, a very powerfull and fast library dedicated to logging.
http://forum.unity3d.com/viewtopic.php?t=8964
It’s easy to use, more powerul than debug.log.
The only drawback is that I never succeeded to not have a rollover log if you want a relative path of your log (I presume it’s the case).
I think it’s a bug in this version of log4net.