added new multi log system
[NeonServV5.git] / src / EventLogger.c
index 691f314479b6548e957824b4edf07db823f2ae5b..f5a8a315942489eb53c0be990d28fc29fbdd8497 100644 (file)
@@ -1,4 +1,4 @@
-/* EventLogger.c - NeonServ v5.5
+/* EventLogger.c - NeonServ v5.6
  * Copyright (C) 2011-2012  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
@@ -21,6 +21,7 @@
 #include "UserNode.h"
 #include "ChanNode.h"
 #include "DBHelper.h"
+#include "log.h"
 
 static struct Event *first_event = NULL, *last_event = NULL;
 
@@ -28,7 +29,7 @@ struct Event *createEvent(struct ClientSocket *client, struct UserNode *user, st
     struct Event *event = malloc(sizeof(*event));
     if (!event)
     {
-        perror("malloc() failed");
+        printf_log("main", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__);
         return NULL;
     }
     event->client = client;