Identify the source process and/or app from an output in the logcat When I plug my phone into my computer, I can see the logcat output in Android Studio. I recently noticed that whenever I start entering a password in a field designated for passwords (the ones that display '*' for any character), the phone prints a very concerning message to the console:
D/HwAutofillHelper: inputType is password, now record

Since it is an Honor Phone, I suppose Hw is short for Huawei?
Nevertheless, I'd like to know if there is a way to find out what process produced this output and what app it belongs to?
Logcat can show the process ID (PID) that outputs the log message.

For command-line: adb logcat will use threadtime by default, which shows the PID
For Android Studio:

Open the Logcat window
From the toolbar (on the left-side), click the Logcat Header (cogwheel) button

If the toolbar is not shown, click the Show Options Menu (cogwheel) button on the top-right corner, then choose Show Toolbar


On Configure Logcat Header dialog, check Show process and thread IDs, then press OK



By default, logcat will show the log in the following format:
date time PID-TID/package priority/tag: message

With the PID, it is possible to identify the source with ps command with -p flag to pinpoint the source, i.e. adb shell ps -p [PID]. The command will show the package name or the executable name.

Example
The logcat returned the following message
2020-07-08 22:06:16.002 18510-18510/? I/ScreenEventHandler: Received Broadcast ACTION_SCREEN_ON

The PID is 18510.
Calling adb shell ps -p 18510 returned the following
USER      PID   PPID  VSIZE   RSS   WCHAN            PC  NAME
u0_a107   18510 15708 1006092 44320 sys_epoll_ 00000000 S com.asksven.betterbatterystats

Thus, the message was written by com.asksven.betterbatterystats (BetterBatteryStats)