Unless you rooted you cannot do this since Jelly Bean. See this Android bug report and this related discussion. Quote:
The change is that third party applications can no longer get the read
logs permission, however every app can read the logs containing only
the lines they have written, without needing any permission.
Keep in mind that access to the logs has never been part of the SDK,
and is still not part of the SDK. If you are relying on it then, even
after this change, you run the risk of breaking in the future. (And
that is partly why this got lost for documentation, it is not part of
the SDK, so there isn't really a place to document it, in fact
documenting it would kind-of make it a part of the SDK which we don't
want. :p)
Also we really really hope that developers don't take this as license
to further abuse the system logs and spew increasing amounts of stuff
into it from their app. Log noise has been a continual problem on
Android (not just for third party apps, we always struggle to ship the
open source platform without a lot of noise), and if things continue
to get worse we will probably make further changes to it to better
control it.
EDIT: if you got access to the device, then you can peek logs there or even try to grant said permission to your app:
adb shell pm grant <pkg> android.permission.READ_LOGS
but for other cases you are out of luck (unless you find a bug in the framework)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…