Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we catch the exception and send debug info to us by RESTful ? #34

Open
luatnd opened this issue Aug 11, 2020 · 1 comment
Open

Can we catch the exception and send debug info to us by RESTful ? #34

luatnd opened this issue Aug 11, 2020 · 1 comment

Comments

@luatnd
Copy link

luatnd commented Aug 11, 2020

Hi,
Is there any way I can catch this exception?
Got the debugging info. So that I can send debugging info to my own service (Slack hook, etc.)

@maxspencer
Copy link
Contributor

Hi @luatnd - yes you could do something like that, for sure. A previous contributor @friedenberg made a Logger interface which you could implement to output the debugging info in a different way:

/**
* Interface that allows flexibility in how TooLargeTool's output is logged. The default
* implementation [LogcatLogger] should be suitable in most cases.
*/
interface Logger {
fun log(msg: String)
fun logException(e: Exception)
}

You would need to ensure that data were handled in a secure way and only captured on debug builds to prevent any possible leakage of sensitive user data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants