123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- /*
- * logging_event.c
- *
- * Copyright 2001-2003, Meiosys (www.meiosys.com). All rights reserved.
- *
- * See the COPYING file for the terms of usage and distribution.
- */
- #include <tchar.h>
- #include "log4c/logging_event.h"
- #include "log4c/category.h"
- #include <stdlib.h>
- #include "sd/malloc.h"
- #include "sd/sd_xplatform.h"
- static const TCHAR version[] = _T("$Id$");
- /*******************************************************************************/
- extern log4c_logging_event_t* log4c_logging_event_new(
- const TCHAR* a_category,
- int a_priority,
- const TCHAR* a_message)
- {
- log4c_logging_event_t* evt;
- evt = (log4c_logging_event_t*)sd_calloc(1, sizeof(log4c_logging_event_t));
- evt->evt_category = a_category;
- evt->evt_priority = a_priority;
- evt->evt_msg = a_message;
- SD_GETTIMEOFDAY(&evt->evt_timestamp, NULL);
- return evt;
- }
- /*******************************************************************************/
- extern void log4c_logging_event_delete(log4c_logging_event_t* ptrThis)
- {
- if (!ptrThis)
- return;
- free(ptrThis);
- }
|