- Home /
Logging frameworks/libraries in C#
I have a team working on an app based on Unity3d and i see them using simple print
and debug.log()
for tracing the flow, finding an error. I come from a C/Python/PHP end and suggested they use multilevel logging(`DEBUG, INFO, WARNING, ERROR, CRITICAL`) so that they don't have too-much or too-little amount of logs at any point of debugging.
They for one can't really look around for it since they don't really know what they're looking for. Can the community help?
Answer by getyour411 · Jul 18, 2015 at 03:39 AM
Change Debug.Log to Debug.LogError, LogWarning ; if you need more levels I'm sure the community will have suggestions like try/catch, exception handling/custom, etc.
Answer by freshingrain · Nov 06, 2015 at 08:25 AM
Unity gives us those APIs, such as Debug.Log(), Debug.LogWarning(), Debug.LogError(), Debug.LogException(). That's enough to use.
But if you want to disable all logs in builds, you have two choices:
Remove Debug.LogXXX() in all scripts of the project. But it's a huge task.
Use the plugin "Disable Logging". You can disable logs in builds with just one click.
Details: https://www.assetstore.unity3d.com/#!/content/36442
Answer by shoeshine1984 · Dec 30, 2015 at 03:30 PM
Perhaps this may be useful to you?
https://www.reddit.com/r/gamedev/comments/3youuf/i_wrote_a_debugging_tool_specifically_for/
Your answer
![](https://koobas.hobune.stream/wayback/20220611231807im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Can you create plugins for the Unity Editor that can be distributed? 1 Answer
Writing to Monodevelop's "Application Output" window 3 Answers
Log file on iPad 1 Answer
command-line build: output to stdout instead of log ? 2 Answers
How do you get OutputDebugString to show up in the Visual Studio output window? 0 Answers