//..............................................................................
//
// $(pluginName) log representer
//

import "log_Representation.jnc"

//..............................................................................

bool $(logRepresenterFunc) (
	log.Representation* representation,
	uint64_t recordCode,
	void const* p,
	size_t size,
	uint_t foldFlags
	)
{
	switch (recordCode)
	{
	case $(logRecordCodeEnum).InfoMessage:
		representation.m_lineAttr.m_iconIdx = log.StdLogIcon.Info;
		representation.m_lineAttr.m_backColor = log.StdLogColor.Info;
		representation.addHyperText ("InfoMessage");
		break;

	case $(logRecordCodeEnum).WarningMessage:
		representation.m_lineAttr.m_iconIdx = log.StdLogIcon.Warning;
		representation.m_lineAttr.m_backColor = log.StdLogColor.Warning;
		representation.addHyperText ("WarningMessage");
		break;

	case $(logRecordCodeEnum).ErrorMessage:
		representation.m_lineAttr.m_iconIdx = log.StdLogIcon.Error;
		representation.m_lineAttr.m_backColor = log.StdLogColor.Error;
		representation.addHyperText ("ErrorMessage");
		break;

	default:
		return false;
	}

	return true;
}

//..............................................................................
