From eca62df908b5bb5ff8382d314bce31c6f64ca6f5 Mon Sep 17 00:00:00 2001 From: sr Date: Fri, 24 Aug 2012 21:02:36 +0200 Subject: ... --- src/server/memlog.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/server/memlog.h (limited to 'src/server/memlog.h') diff --git a/src/server/memlog.h b/src/server/memlog.h new file mode 100644 index 0000000..24e3880 --- /dev/null +++ b/src/server/memlog.h @@ -0,0 +1,39 @@ +/* + * This file is part of the Distributed Network Block Device 3 + * + * Copyright(c) 2011-2012 Simon Rettberg + * + * This file may be licensed under the terms of of the + * GNU General Public License Version 2 (the ``GPL''). + * + * Software distributed under the License is distributed + * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either + * express or implied. See the GPL for the specific language + * governing rights and limitations. + * + * You should have received a copy of the GPL along with this + * program. If not, go to http://www.gnu.org/licenses/gpl.html + * or write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef MEMLOG_H_ +#define MEMLOG_H_ + +void initmemlog(); + +/** + * Add a line to the log + */ +void memlogf(char *text, ...); + +/** + * Return log lines, separated by \n + * You need to free() the returned memory after use + * Returns NULL on error + * maxlines - Limit number of lines returned, 0 = everything + */ +char * fetchlog(int maxlines); + +#endif /* MEMLOG_H_ */ -- cgit v1.2.3-55-g7522