Logging 使用Pantheios日志库记录到windows事件
如何使用Pantheios将日志消息发送到windows事件日志 及 如果我使用Pantheious从多个进程执行此操作,它会是进程吗 安全吗?我要买克拉吗Logging 使用Pantheios日志库记录到windows事件,logging,pantheios,Logging,Pantheios,如何使用Pantheios将日志消息发送到windows事件日志 及 如果我使用Pantheious从多个进程执行此操作,它会是进程吗 安全吗?我要买克拉吗 使用be.WindowsEventLog 不,我不这么认为,就像您使用来自多个进程的事件日志一样 使用be.WindowsEventLog 不,我不这么认为,就像您使用来自多个进程的事件日志一样 您需要执行以下操作: 您需要链接be.WindowsEventLog。 在Windows上,可以通过隐式链接将#include添加到一个编译单元来
您需要执行以下操作:
在Windows上,可以通过隐式链接将
#include
添加到一个编译单元来完成此操作// The following allows this to be used with the Windows EventLog back-end.
PANTHEIOS_CALL(void) pantheios_be_WindowsEventLog_calcCategoryAndEventId(
int /* backEndId */
, int /* severity */
, pantheios::uint16_t* category
, pantheios::uint32_t* eventId
) /* throw() */
{
// NOTE: A proper implementation would specify non-0 values here that
// identify the requisite event identifier and category within the
// associated message file(s).
*eventId = 0;
*category = 0;
}
有关
类别
和事件ID
的文档可分别在和上找到。您需要执行以下操作:
在Windows上,可以通过隐式链接将
#include
添加到一个编译单元来完成此操作// The following allows this to be used with the Windows EventLog back-end.
PANTHEIOS_CALL(void) pantheios_be_WindowsEventLog_calcCategoryAndEventId(
int /* backEndId */
, int /* severity */
, pantheios::uint16_t* category
, pantheios::uint32_t* eventId
) /* throw() */
{
// NOTE: A proper implementation would specify non-0 values here that
// identify the requisite event identifier and category within the
// associated message file(s).
*eventId = 0;
*category = 0;
}
有关类别
和事件ID
的文档可分别在和上找到