syslogger.hpp 822 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
/*******************************************************************************
 * Copyright 2019 UChicago Argonne, LLC.
 * (c.f. AUTHORS, LICENSE)
 *
 * This file is part of the Argo containers project.
 * For more info, see https://xgitlab.cels.anl.gov/argo/containers
 *
 * SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/

Swann Perarnau's avatar
Swann Perarnau committed
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#ifndef __SYSLOGGER_HPP__
#define __SYSLOGGER_HPP__
#include "ilogger.hpp"

class Syslogger: public ILogger
{
		int log_type_to_priority(Log_type);
	public:
		Syslogger(uid_t ruid, Log_type log_type = LOG_TYPE_ALL, bool log_to_stderr = false);
		~Syslogger();
		virtual void log(Log_type type, const string& message, int errnum = 0);
		virtual inline Log_dest log_destination() const 
		{return LOG_DEST_SYSLOG;}
};

#endif