added new multi log system
[NeonServV5.git] / src / tools.c
index 5447232a347f391f5881ff7a4cdf6244aa24e000..0232671c5050767aca56177a5bf5a7731ce0449d 100644 (file)
@@ -20,6 +20,7 @@
 #include "lang.h"
 #include "ClientSocket.h"
 #include "IPNode.h"
+#include "log.h"
 
 static const struct default_language_entry msgtab[] = {
     {"TIME_MASK_2_ITEMS", "%s and %s"}, /* {ARGS: "2 days", "1 hour"} */
@@ -388,7 +389,7 @@ int getCurrentSecondsOfDay() {
 struct ModeBuffer* initModeBuffer(struct ClientSocket *client, struct ChanNode *chan) {
     struct ModeBuffer *modeBuf = malloc(sizeof(*modeBuf));
     if(!modeBuf) {
-        perror("malloc() failed");
+        printf_log("main", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__);
         return NULL;
     }
     modeBuf->client = client;