Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Feedback Android Logcat Package Feedback

Discussion in 'Android' started by Tomas1856, Dec 8, 2018.

  1. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    1,795
    Hey,

    starting from Unity 2019.1.0a11 we're introducing Android Logcat package. More info here - https://docs.unity3d.com/Packages/com.unity.mobile.android-logcat@0.1/manual/index.html

    Quick steps to set it up:
    * Unity has to have Android Support installed
    * Set active platform to be Android in Build Settings Window
    * Enable preview packages via Window->PackageManager->Advanced->Show preview packages

    PreviewPackages.jpg

    * Select and install Android Logcat
    AndroidLogcat.jpg

    * Android Logcat can be enabled via Windows->Analysis->Android Logcat
    * Alternatively when you'll do Build & Run for Android, Android Logcat will open automatically and will filter to your package.


    Feedback is very welcomed !
     
    Last edited: Feb 1, 2019
  2. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,347
    I was excited to until I read "Unity has to have Android Support installed"I assume Android Studio.. the bit I was hoping to get rid of with this package as a replacement :)

    Also why not include a screenshot of what this thing actually looks like.. we've all seen the package manager.
     
  3. ScottF

    ScottF

    Director of Development, Mobile Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    83
    There are a number of screenshots posted if you follow the link to the documentation at the top. Also, you do not need Android studio. You need Unity's Android support installed and the Android SDK (soon to be installed automatically by Unity). If your doing any Android developer with Unity you would already have the Android support installed.
     
    Cromfeli and Player7 like this.
  4. pahosler

    pahosler

    Joined:
    Jun 19, 2018
    Posts:
    2
    Android has cli tools, so Studio isn't necessarily a requirement. Available for Windows, Mac, and Linux
     
  5. pahosler

    pahosler

    Joined:
    Jun 19, 2018
    Posts:
    2
    Awesome!
    Now, when are we getting a stable Linux version of Unity :D
     
    FROS7 likes this.
  6. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    174
    I find Logcat a pain sometimes, so this is nice to see.
     
  7. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    3,581
    Is there an option to output logcat messages, that are specific to the game only, to the Console window too? Or do I have to use the new Logcat Window?
     
  8. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    718
    This is not really a feedback on the functionality but feedback non the less... It's, uhhh, it's kind of ugly. Though it is so early in development that is probably the last thing on your minds.
     
  9. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    1,795
    No, there's no option to output logcat messages to Console.
     
  10. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    1,795
    Can you elaborate what exactly, so we can improve? :)
     
  11. SoxwareInteractive

    SoxwareInteractive

    Joined:
    Jan 31, 2015
    Posts:
    345
    Hi @Tomas1856,
    I love the idea of having logcat directly in Unity. So thank you very much for your effort on this.

    What I've noticed is that the search bar seems to be case sensitive. Please make it case insensitive by default (I think that's what people would expect most of the time).

    I think the look of the GUI could be improved at some points:
    1. The search bar seems to be not in line with the rest of the menu bar (there is a gap of a few pixels at the top). Also the search icon is pixelated and streched (running on Windows 10 on a 1080p screen). The input text is not aligned in the vertical center.
      And it looks strange that the search bar is round at the left and has edges on the right. I would say go for edges on both sides (as that's what matches the button styles).
      As a plus, updating the filtering while typing (instead of waiting for an enter) would be amazing. It's especially weird when you remove the filter text, but the text is still filtered.
    2. There is a small gap (of 1 or 2 pixels) after each scroll bar. On the left of the horizontal scrollbar there is also a gap.
    3. The "Connected" text is not aligned in the vertical center of the footer. The green color is hard to read on the light editor skin (it works on the dark skin).
    4. Suggestion: I think it would look better if every second log line is slightly darker (or lighter) like in the default Unity console.
    5. Another Suggestion: If a filter is applied to a column, change the color slightly. This is to clearly show the user that there is an active filtering and that this might be the reason why he is not seeing certain logs.
    upload_2019-3-9_9-0-14.png

    Feature request:
    I would love to have a button "Open Terminal" so that we can access the ADB via a Terminal. There are a few things that can only be done via ADB terminal commands (deleting sideloaded apps on the Oculus GO for example).

    Thanks! I Hope this helps.
     
    Last edited: Mar 9, 2019
  12. Vincent-Zhang

    Vincent-Zhang

    Unity Technologies

    Joined:
    Jan 23, 2013
    Posts:
    87
    Thanks for your feedback.

    For search bar case sensitive: I think a toggle should help here.

    For the GUI suggestions.
    #1. Yes, we also noticed the search bar problem, have an issue filed for it.
    #2. Nice catch, will check it out.
    #3. Good point, will talk with UX guys how to set it.
    #4. Did that in the new version.
    #5. Good suggestion, will file an issue to make sure it won't be forgotten.

    About the "Open Terminal", good point! Thank you again!
     
    SoxwareInteractive likes this.
  13. SoxwareInteractive

    SoxwareInteractive

    Joined:
    Jan 31, 2015
    Posts:
    345
    @Vincent-Zhang,
    amazing, thanks for your work on this :)

    Yes this would make sense. I think case insensitive search should be the default though. (Imagine you've created some log messages because you are tracing a bug in your game. You search for the messages in the logcat window and don't find it. This would guide you in a completely wrong direction because you think your app didn't log the message although you just haven't used an uppercase for the first letter. That's exactly what happened to me and it took way longer than I hoped until I figured out that the search is case sensitive ^^).
     
  14. Vincent-Zhang

    Vincent-Zhang

    Unity Technologies

    Joined:
    Jan 23, 2013
    Posts:
    87
    Yeah, making case insensitive default makes sense to me too. :)
     
    SoxwareInteractive likes this.
  15. SoxwareInteractive

    SoxwareInteractive

    Joined:
    Jan 31, 2015
    Posts:
    345
    Hi @Vincent-Zhang,
    I've just played around with the Logcat Package (0.1.5) in Unity 2019.1.0f2 and I noticed some performance issues. Please notice the periodic CPU performance spikes that you can see in blue at the CPU Usage graph:

    upload_2019-4-20_9-0-56.png

    These spikes are clearly noticeable in the editor (e.g. when moving the camera through the scene or when playing in the editor). According to the profiler these spikes are caused by "AndroidLogcatConsoleWindow.RetrieveConnectedDeviceIDs()", I guess because it makes a blocking call to ADB.Run(). Moving that call into a different thread would probably solve the issue.

    Please note that I had no android device connected at this time.
     
  16. JustAnotherDude

    JustAnotherDude

    Joined:
    Oct 28, 2013
    Posts:
    127
    Omg it properly detected the unity game process and only shows the relevant logs, something I never managed to do with the android monitor, I hated filtering by tag...

    This package is fantastic! Thank you whoever made this!
     
  17. Vincent-Zhang

    Vincent-Zhang

    Unity Technologies

    Joined:
    Jan 23, 2013
    Posts:
    87
    Thanks @SoxwareInteractive , we have this issue tracked and will improve it in the future release.
     
    SoxwareInteractive likes this.
  18. JustAnotherDude

    JustAnotherDude

    Joined:
    Oct 28, 2013
    Posts:
    127
    I do have a complaint now, the yellow font on warnings for the non pro (gray) editor is almost unreadable.
     
  19. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    778
    The android logcat window cause some serious hickup for me. It basically freeze the editor every 2 second for 1 second.
    Sometime it even does it when it is not in focus.
     
  20. SoxwareInteractive

    SoxwareInteractive

    Joined:
    Jan 31, 2015
    Posts:
    345
    I've noticed that too (see my previous post). I think this only happens when the logcat window is not connected with an android device. If you close the window while not using it you can workaround this issue.
     
  21. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    778
    I think you are right. The battery of the debug device had run out when I noticed.
    Probably why I didn't notice the lag initially.
     
    SoxwareInteractive likes this.
  22. AllanRW

    AllanRW

    Joined:
    Nov 6, 2014
    Posts:
    10
    Thanks for this package its very helpful, it would be good if it clear old filters as its become a mess after some builds...

    upload_2019-6-3_17-27-6.png
     
  23. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    1,795
    How about if it only contained last 10 exited processes?
     
    JustAnotherDude likes this.
  24. JustAnotherDude

    JustAnotherDude

    Joined:
    Oct 28, 2013
    Posts:
    127


    Any way to change this text color?
     
  25. Vincent-Zhang

    Vincent-Zhang

    Unity Technologies

    Joined:
    Jan 23, 2013
    Posts:
    87
    We talked about letting users to pick the colors for different priorities internally, for now the only way is to change the code in `AndroidLogcatStyles.cs`...
     
    JustAnotherDude likes this.
  26. AllanRW

    AllanRW

    Joined:
    Nov 6, 2014
    Posts:
    10
    Sounds good!

    I also vote for the "open terminal" button, it will be useful!