Introduction
This is a tool class for use cases to find exception information in logcat in real time
#Usage
1. Import
from logcat_monitor.logcat_monitor import LogcatMonitor
2. Start
logcat_monitor = LogcatMonitor(serial_number, parent_folder, key_dict, rows)
logcat_monitor.start_monitor()
LogcatMonitor parameters:
serial_number: Serial number of the device, If only one device is connected, it can be set to None
parent_folder: The directory where the file is stored. In this directory, a directory named "logcats" will be created
key_dict: Keyword dictionary to find.
{"ANR in ": "Anr",
"FATAL EXCEPTION:": "Fatal",
"signal 6": "Signal6",
"signal 7": "Signal7",
"signal 11": "Signal11",
"CRASH: ": "Crash",
"Force Closed": "ForceClose"}
In dictionary, "Key" is keyword to find. "Value" must conform to Python's variable naming rules.
After finding the corresponding problem, a file named "Value_%Y%m%d%H%M%S%f.txt" will be generated.
rows: After finding the problem, intercept the number of lines of logcat. Default is 100.
3. Stop
logcat_monitor.stop_monitor()
After stopping monitoring, a file named "statistics.txt" will be generated.
Example
if __name__ == '__main__':
...
# Monitor logcat in real time
logcat_monitor = LogcatMonitor(main_device.serial_number, parent_folder, key_dict={"E/ActivityManager": "Test"}, rows=50)
logcat_monitor.start_monitor()
...
logcat_monitor.stop_monitor()
if __name__ == '__main__':
...
# Filter existing logcat files
logcat_monitor = LogcatMonitor()
logcat_monitor.filter_file("logcat.txt")
Metadata
Release files for logcat-monitor 0.0.25
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| logcat_monitor-0.0.25.tar.gz | 7.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| logcat_monitor-0.0.25-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.2 kB
Release files / logcat_monitor-0.0.25.tar.gz
| Download URL | logcat_monitor-0.0.25.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f9b3ea2b24d377ac87164e89abb91f80d212bbbb9b9803c3302e1665e95d52e
|
|
BLAKE2b-256 checksum How to use checksums |
4d6d6b98e1dae2ce741da3278ea174cbd456c7c42b20cf1a440631941596285d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Release files / logcat_monitor-0.0.25-py3-none-any.whl
| Download URL | logcat_monitor-0.0.25-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
208690924604d9aef84aa3c7656b8dd7fa113fa46a0c6aac8ddc83527f1e1d22
|
|
BLAKE2b-256 checksum How to use checksums |
f73c21557687286882b2b96085ad715f2a46b7e728be147bb35264ed10a569d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Security for logcat-monitor 0.0.25
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.