2 * collectd - src/lua_exports.c
3 * Copyright (C) 2010 Julien Ammous
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation; only version 2.1 of the License is
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 /* this file contains the functions exported to lua scripts */
26 /* log_info(string) */
27 static int log_info(lua_State *l)
29 const char *message = lua_tostring(l, 1);
31 // return the number of values pushed on stack
36 static int register_exported_functions(lua_State *l){
37 lua_register(l, "log_info", log_info);