Imex_Default_Log_Proc_Get()

Abstract

Gets the default procedure used for logging errors in text import files.

Syntax

Imex_Default_Log_Proc_Get ()
Argument Type Description
no arguments

Return Type

ImexT_Log_Proc

The default logging procedure.

imex.h

Details

This function returns a default error logging procedure that can be used as the log_proc argument when calling Imex_Topo_Import_Logged() or Imex_Traf_Import_Logged().

The default procedure is as follows:

extern "C" {
static int
Imex_Default_Log_Write (const char *package, const char *severity_str,
	int line, const char *message)
	{
	int retval = 0;
	FIN (Imex_Default_Log_Write (package, severity, line, message));

	if (strcmp (severity_str,
		ImexI_Error_Level_String[ImexC_Error_Level_Critical]) == 0)
		{
		Ets_Msg_Confirm (NULL, "Error in import file",
			package, severity_str, message);
		}
	else if (strcmp (severity_str,
		ImexI_Error_Level_String[ImexC_Error_Level_Non_Critical]) == 0)
		{
		Ets_Msg_Info_Logged (NULL, package, severity_str, message);
		}
	else if (strcmp (severity_str,
		ImexI_Error_Level_String[ImexC_Error_Level_Warning]) == 0)
		{
		Ets_Msg_Info_Logged (NULL, package, severity_str, message);
		}
	else
		{
		Ets_Msg_Info_Logged (NULL, package, NULL, message);
		}
	FRET (retval);
	}
}

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com