/*
** SellaNMS
** $Id: syslog.cxx,v 1.10 2005/03/31 18:57:12 sella Exp $
** Copyright (c) 2001-2005 Digital Genesis Software, LLC. All Rights Reserved.
** Released under the GPL Version 2 License.
** http://www.digitalgenesis.com
*/

#ifdef HAVE_CONFIG_H
	#include "config.h"
#endif

#include "syslog.h"
#include "debug.h"
#include <pthread.h>

Syslog::Syslog() {
	this->name.append(" syslog");

	has_scheduler = false;
	has_execute = true;
}

RESULT Syslog::execute() {
	RESULT result = SUCCESS;
	pthread_t thread_id = pthread_self();

	return result;
}

RESULT Syslog::readConfig() {
	RESULT result = SUCCESS;

	/* Large queue-depth results in increased RAM usage, during high event periods. An overwhelmed system could grow out of control. */
	if (config->assignValue("queue-depth", queueDepth, MODULE_OUTPUT_SYSLOG_QUEUEDEPTH_DEFAULT)) {
		if (queueDepth < 1) {
			queueDepth = MODULE_OUTPUT_SYSLOG_QUEUEDEPTH_DEFAULT;
		}
	}

	/* Configure Storage */
	storage.setConfig(*config);

	return result;
}

RESULT Syslog::printConfig() {
	LMSG("queue-depth: %lu", this->queueDepth);

	return Output::printConfig();
}

/*
** Local Variables:
** c-basic-offset: 3
** tab-width: 3
** End:
** vim600: fdm=marker
** vim: noet ts=3 sw=3
*/
