mirror of
https://github.com/darlinghq/darlingserver.git
synced 2024-11-23 04:19:44 +00:00
psynch: Log to the server log file rather than stdout
This commit is contained in:
parent
11fc38e931
commit
df94cff467
@ -35,6 +35,8 @@
|
|||||||
#include <sys/proc.h>
|
#include <sys/proc.h>
|
||||||
#include <net/if_var.h>
|
#include <net/if_var.h>
|
||||||
#include "kern_internal.h"
|
#include "kern_internal.h"
|
||||||
|
|
||||||
|
#include <darlingserver/duct-tape/log.h>
|
||||||
#endif // __DARLING__
|
#endif // __DARLING__
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -98,8 +100,14 @@
|
|||||||
typedef struct uthread *uthread_t;
|
typedef struct uthread *uthread_t;
|
||||||
|
|
||||||
//#define __FAILEDUSERTEST__(s) do { panic(s); } while (0)
|
//#define __FAILEDUSERTEST__(s) do { panic(s); } while (0)
|
||||||
|
|
||||||
|
#ifdef __DARLING__
|
||||||
|
#define __FAILEDUSERTEST__(s) do { dtape_log_error("PSYNCH: pid[%d]: %s\n", proc_pid(current_proc()), s); } while (0)
|
||||||
|
#define __FAILEDUSERTEST2__(s, x...) do { dtape_log_error("PSYNCH: pid[%d]: " s "\n", proc_pid(current_proc()), x); } while (0)
|
||||||
|
#else
|
||||||
#define __FAILEDUSERTEST__(s) do { printf("PSYNCH: pid[%d]: %s\n", proc_pid(current_proc()), s); } while (0)
|
#define __FAILEDUSERTEST__(s) do { printf("PSYNCH: pid[%d]: %s\n", proc_pid(current_proc()), s); } while (0)
|
||||||
#define __FAILEDUSERTEST2__(s, x...) do { printf("PSYNCH: pid[%d]: " s "\n", proc_pid(current_proc()), x); } while (0)
|
#define __FAILEDUSERTEST2__(s, x...) do { printf("PSYNCH: pid[%d]: " s "\n", proc_pid(current_proc()), x); } while (0)
|
||||||
|
#endif // __DARLING__
|
||||||
|
|
||||||
lck_mtx_t *pthread_list_mlock;
|
lck_mtx_t *pthread_list_mlock;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user