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

Use formatter cache #212

Merged
merged 2 commits into from
Feb 28, 2017
Merged

Use formatter cache #212

merged 2 commits into from
Feb 28, 2017

Conversation

mstemm
Copy link
Contributor

@mstemm mstemm commented Feb 27, 2017

Use the sinsp_evt_formatter_cache added in
draios/sysdig#771 instead of a local cache. This
simplifies the lua side quite a bit, as it only needs to call
format_output(), and clean up everything via free_formatters() in
output_cleanup().

On the C side, use a sinsp_evt_formatter object and use it in
format_event().

In C functions that implement lua functions, don't directly throw
falco_exceptions, which results in opaque error messages like:

Mon Feb 27 10:09:58 2017: Runtime error: Error invoking function output:
C++ exception. Exiting.

Instead, return lua errors via lua_error().
Use the sinsp_evt_formatter_cache added in
draios/sysdig#771 instead of a local cache. This
simplifies the lua side quite a bit, as it only needs to call
format_output(), and clean up everything via free_formatters() in
output_cleanup().

On the C side, use a sinsp_evt_formatter object and use it in
format_event().
@mstemm mstemm merged commit 561c388 into dev Feb 28, 2017
@mstemm mstemm deleted the use-formatter-cache branch February 28, 2017 05:10
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.

None yet

1 participant