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

Allow user to set a limit on size of local variables which will be printed #16

Open
alexdowad opened this issue Jun 27, 2022 · 0 comments · May be fixed by #17
Open

Allow user to set a limit on size of local variables which will be printed #16

alexdowad opened this issue Jun 27, 2022 · 0 comments · May be fixed by #17

Comments

@alexdowad
Copy link
Contributor

@ignacio, I really like this library and am using it in production.

The other day there was an incident where a user was trying to upload a large file. This caused an error to be raised in the Lua code... and since StackTracePlus was in use, and the content of the file was in a local variable... it logged the entire contents of the file.

We would like to avoid log entries which are dozens or hundreds of MB long. I am wondering if StackTracePlus could be enhanced to allow setting a maximum string length which will be logged (perhaps also maximum table size/depth would also be good).

If a string is too long, I am thinking it could be printed something like:

"contents contents contents..." (truncated at XYZ bytes)

If you like this idea, I am happy to implement it.

@takase1121 takase1121 linked a pull request Jul 24, 2023 that will close this issue
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 a pull request may close this issue.

1 participant