/*
 * @file  logger_enum.h
 * @brief logger module constants enumeration.
 *
 * L7VSD: Linux Virtual Server for Layer7 Load Balancing
 * Copyright (C) 2008  NTT COMWARE Corporation.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA
 *      
 **********************************************************************/

#ifndef __LOGGER_ENUM_H__
#define __LOGGER_ENUM_H__

#include <string>
#include <log4cxx/level.h>

/*!
 * LogLevel enumeration.
 */
enum LOG_LEVEL_TAG
{
	LOG_LV_NONE = 0,
	LOG_LV_DEBUG,
	LOG_LV_INFO,
	LOG_LV_WARN,
	LOG_LV_ERROR,
	LOG_LV_FATAL
};

inline LOG_LEVEL_TAG& operator++(LOG_LEVEL_TAG& level) {
	level = static_cast<LOG_LEVEL_TAG>(level + 1);
	return level;
}

/*!
 * Category enumeration.
 * LOG_CAT_SSLPROXY_LOGGER should be first for logger log.
 */
enum LOG_CATEGORY_TAG
{
	LOG_CAT_NONE = 0,
	LOG_CAT_SSLPROXY_LOGGER = 1,
	LOG_CAT_SSLPROXY_PARAMETER,
	LOG_CAT_SSLPROXY_COMMON,
	LOG_CAT_SSLPROXY_SERVER,
	LOG_CAT_SSLPROXY_SESSION,
	LOG_CAT_SSLPROXY_CONNECTION,
	LOG_CAT_PACKET_EDIT,
	LOG_CAT_PACKET_EDIT_HTTP,
	LOG_CAT_END
};


inline LOG_CATEGORY_TAG& operator++(LOG_CATEGORY_TAG& cat) {
	cat = static_cast<LOG_CATEGORY_TAG>(cat + 1);
	return cat;
}

/*!
 * Rotation enumeration.
 */
enum LOG_ROTATION_TAG {
	LOG_ROT_SIZE,
	LOG_ROT_DATE,
	LOG_ROT_DATESIZE
};

/*!
 * RotationTiming enumeration.
 */
enum LOG_ROTATION_TIMING_TAG {
	LOG_TIM_YEAR,
	LOG_TIM_MONTH,
	LOG_TIM_WEEK,
	LOG_TIM_DATE,
	LOG_TIM_HOUR
};
	
#endif	//__LOGGER_ENUM_H__
