noontz
noontz

Reputation: 2007

How to prevent UnityEngine.Debug.Log writing multiple lines to ADB

I am using ADB to log in Windows PowerShell from a Unity built application running on a connected Android device. I am only interested in my own message invoked in script from e.g. UnityEngine.Debug.Log("## State set to SolvingAnchor"), but Unity appends 8 lines to this message:

As seen in the output filtering on regex is not working as I would have hoped. Is there a way to only print the message and skip the Unity generated redundant lines?

Upvotes: 2

Views: 2436

Answers (2)

JeanLuc
JeanLuc

Reputation: 4903

In the Project Settings > Player > Android > Other Settings > Logging set all Logging Types to None or Script Only.

This will keep the ADB logcat rather compact.

Player Settings > Log Type

Upvotes: 4

You can change the Stack Trace Logging setting of your project in the Console window's top-right-corner menu:

enter image description here

Setting it to "None" will make Unity omit all those extra stack trace lines. You can set it for Errors, Warnings, Logs etc separately, or change it for all types of messages under "All".

Upvotes: 6

Related Questions