pidcat icon indicating copy to clipboard operation
pidcat copied to clipboard

mask or regexp for tags and app packages

Open allco opened this issue 9 years ago • 3 comments

It would be so useful if you implemented such great feature.

allco avatar Jan 28 '16 12:01 allco

Can you give an example of why this would be useful?

JakeWharton avatar Jan 29 '16 04:01 JakeWharton

When you work with couple of apps in the same time, it would be nice to see logs from all of them not only from the one. It will be possible to deliver just the name of your company and then logs from all your company's apps will appear.

Regarding tags, If you working with colleagues of the same project it is nice way to add special mark to your own logs and then filter output by this mark. For example I'm using the special logger that automatically takes the name of last class from callstack and then add special (programmer-related or context-related) symbol and uses it as tag.

allco avatar Jan 29 '16 06:01 allco

Regexp for tags (or just a tag prefix) might be useful to filter out app module logs or particular library logs.

For example if app has user module:

pidcat app.package.com -t "User:*"
> User:View created
> User:View get user
> User:Repository check cache
> User:Repository call network api

Filtering images library logs:

pidcat app.package.com -t "Images*"
> ImagesCore instance created
> ImagesHttpClient loading https://hello.com/png.jpg
> ImagesHttpClient failed to load https://hello.com/png.jpg
> ImagesScheduler deliver error of https://hello.com/png.jpg

elevenetc avatar Mar 09 '20 11:03 elevenetc