[syslog-ng] [PATCH] tfjson: Add module_info.

Gergely Nagy algernon at balabit.hu
Sun Aug 28 11:38:42 CEST 2011


In order for syslog-ng --module-registry to be able to display
meaningful information about a module, module_info must be set in said
modules.

Add that to tfjson, as it was lacking one.

Signed-off-by: Gergely Nagy <algernon at balabit.hu>
---
 modules/tfjson/tfjson.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/modules/tfjson/tfjson.c b/modules/tfjson/tfjson.c
index 39a6cdb..3d54201 100644
--- a/modules/tfjson/tfjson.c
+++ b/modules/tfjson/tfjson.c
@@ -155,3 +155,13 @@ tfjson_module_init(GlobalConfig *cfg, CfgArgs *args)
   plugin_register(cfg, builtin_tmpl_func_plugins, G_N_ELEMENTS(builtin_tmpl_func_plugins));
   return TRUE;
 }
+
+const ModuleInfo module_info =
+{
+  .canonical_name = "tfjson",
+  .version = VERSION,
+  .description = "The tfjson module provides a JSON formatting template function for syslog-ng.",.
+  .core_revision = SOURCE_REVISION,
+  .plugins = builtin_tmpl_func_plugins,
+  .plugins_len = G_N_ELEMENTS(builtin_tmpl_func_plugins),
+};
-- 
1.7.2.5




More information about the syslog-ng mailing list