diff --git a/CHANGELOG.md b/CHANGELOG.md index de7b879..58cf318 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.4.2] - 2024-05-13 +### Fixes & Improvements + - Fix issue, where logcat package would throw an error if there are multiple devices connected. + ## [1.4.1] - 2024-04-12 ### Fixes & Improvements - Logcat package now detects if the logs with a specific tag are disabled on a device (this was causing messages not to be displayed), and if so, displays a message with an option to fix such behavior. diff --git a/Editor/AndroidLogcatDevice.cs b/Editor/AndroidLogcatDevice.cs index b5e924d..df3bea6 100644 --- a/Editor/AndroidLogcatDevice.cs +++ b/Editor/AndroidLogcatDevice.cs @@ -250,8 +250,9 @@ protected override string GetTagPriorityAsString(string tag) if (m_Device == null || State != DeviceState.Connected) return string.Empty; - var args = $"shell getprop log.tag.{tag}"; + var args = $"-s {Id} shell getprop log.tag.{tag}"; var output = m_ADB.Run(new[] { args }, $"Failed to get priority for tag '{tag}'"); + AndroidLogcatInternalLog.Log($"adb {string.Join(" ", args)}\n{output}"); return output; } @@ -259,7 +260,8 @@ protected override void SetTagPriorityAsString(string tag, string priority) { if (m_Device == null || State != DeviceState.Connected) return; - var args = $"shell setprop log.tag.{tag} {priority}"; + var args = $"-s {Id} shell setprop log.tag.{tag} {priority}"; + AndroidLogcatInternalLog.Log($"adb {string.Join(" ", args)}"); m_ADB.Run(new[] { args }, $"Failed to set priority '{priority}' for tag '{tag}'"); } diff --git a/package.json b/package.json index 99ca694..a48d8ef 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.unity.mobile.android-logcat", "displayName": "Android Logcat", - "version": "1.4.1", + "version": "1.4.2", "unity": "2021.3", "description": "Android Logcat package provides support for:\n - Android log messages\n - Android application memory statistics\n - Input injection\n - Android Screen Capture\n - Android Screen Recorder\n - Stacktrace Utility\n\nClick the 'View documentation' link above for more information.\n\nThe window can be accessed in Unity Editor via 'Window > Analysis > Android Logcat', or simply by pressing 'Alt+6' on Windows or 'Option+6' on macOS. \n\nMake sure to have Android module loaded and switch to Android build target in 'Build Settings' window if the menu doesn't exist.", "keywords": [ @@ -11,15 +11,15 @@ ], "dependencies": {}, "_upm": { - "changelog": "### Fixes & Improvements\n - Logcat package now detects if the logs with a specific tag are disabled on a device (this was causing messages not to be displayed), and if so, displays a message with an option to fix such behavior.\n - Fixed an issue with MemoryWindow, where active package would get lost during domain reload.\n - Improved internal log to handle a large amount of messages.\n - Fixed an issue where logcat dispatcher would stop responding during domain reload.\n - Fixed an issue where MemoryWindow would fail to query memory stats using package name. It now uses process id instead.\n - Added Process Manager control which you can use to terminate an application or send a trim memory event.\n - Fixed tag filtering, previously logcat would check if incoming_tag contains tag_in_filter, now it will perform incoming_tag equals tag_in_filter. That way it's easier to filter messages with tags which have the same begining." + "changelog": "### Fixes & Improvements\n - Fix issue, where logcat package would throw an error if there are multiple devices connected." }, "upmCi": { - "footprint": "9ac35ce8b3b9ed6b209c0fd42aa7041e58685885" + "footprint": "ccb1276ef1f6d909fb5407a33c68eebd9fba9f2c" }, "documentationUrl": "https://docs.unity3d.com/Packages/com.unity.mobile.android-logcat@1.4/manual/index.html", "repository": { "url": "https://github.com/Unity-Technologies/com.unity.mobile.logcat.git", "type": "git", - "revision": "d9514647440dd839af56d46ee77717919a41b302" + "revision": "98e03c396b230c19f4b96a0e9b43fe805f03e784" } }