4

In most of the tutorials on YouTube, the output shown in console is mostly the output made by user itself (by that I mean output created by calling print() - my console is a mess though)

enter image description here

Is there a way to reduce the output only to things I call print() on in Android studio?

2
  • change finest to something else - i mean top-left spinner in the console tab Commented Aug 16, 2019 at 10:32
  • tryied all of them - nothing changes - besides three last ones (warning, severe , shout) thoese clean console totally and there is no output at all Commented Aug 16, 2019 at 11:30

2 Answers 2

9
+50

As of now, there is no way of showing logs which are only from print() statement. However there is a workaround.

Whenever you write something in print statement, you can add some prefix to it like instead of writing it as

print('This is my log message');  // earlier way

You can write it as

print('myTag: This is my log message');  // newer way

After that all you need to do is use the search box functionality

enter image description here


Note: You can also create live template for print so that myTag is automatically added to it.

Sign up to request clarification or add additional context in comments.

1 Comment

ok, ty for information cops! will award U "50" points in next 24 h
-1

You can use Dart Dev tools and set up a filter to get only the print statements Next to the hot restart, you can find the button get Dart Dev tools In Dart dev tools go to the logging tab and create a filter k:stdout

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.