I have an app and I am using Log.d(tag, mensaje);
it to print messages and to be able to identify where my code fails.
The issue is that when I already have many Logs (especially if they are inside a loop) and I add new ones, the new ones no longer appear in the logcat.
To solve the aforementioned, what I have done is remove all the logs that I no longer need and leave only the new ones.
This problem generally occurs because we print a large amount of information (there is a limit to the information contained in the window) and a filter is not defined.
What happens is that not all the information can be contained in the window
LogCat
, even more so if system information is being printed and these messages are considerable:The recommended thing in this situation is to configure
LogCat
it so that it only shows information from your Application, using the option"Show only selected application"
:You can also edit your own filter or in this case, in addition to showing only messages from your application, you can also filter using a specific Tag:
For more information check the official documentation: Writing and viewing logs with Logcat