Skip to content

Keep a module's log in the modules log whatever tag it passes - #1116

Open
Dev4Mod wants to merge 1 commit into
JingMatrix:masterfrom
Dev4Mod:module-log-tag
Open

Dev4Mod wants to merge 1 commit into
JingMatrix:masterfrom
Dev4Mod:module-log-tag

Conversation

@Dev4Mod

@Dev4Mod Dev4Mod commented Nov 28, 2026

Copy link
Copy Markdown

The libxposed log(int, String, String, Throwable) writes "to the Xposed log", and its tag is any nullable string. VectorContext.log passes that tag to logcat as it is, but logcat.cpp only copies an entry into the modules log when its tag is one of kModuleTags. So only tag == null reaches the modules log; with a tag of its own the entry stays in logcat and is not in the verbose log either, unless the tag happens to start with Vector or LSPosed.

I ran into it with YukiHookAPI's libxposed runtime, which logs hook callback exceptions under its own tag: none of them showed up in the manager.

The entry is now always written under VectorContext, and the module's tag joins the package name in the prefix:

com.example.module/MyTag: message

With a null tag the line is the same as before (com.example.module: message). The tag is no longer the logcat tag, so logcat -s MyTag won't find these lines anymore, but it is still in every line, and the deprecated log(String) worked the same way, under a fixed tag.

VectorContext.log handed the module's tag straight to logcat, and the daemon only copies an entry into the modules log when its tag is one of kModuleTags, so anything logged with a tag of its own went to logcat alone. The entry is now written under VectorContext and the module's tag goes into the message prefix, after the package name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant