aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/venti/srv/trace.c
blob: 3c01695578e4cf9f7640bb5d029b1fa4b22db784 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "stdinc.h"
#include "dat.h"
#include "fns.h"

char TraceDisk[] = "disk";
char TraceLump[] = "lump";
char TraceBlock[] = "block";
char TraceProc[] = "proc";
char TraceWork[] = "work";
char TraceQuiet[] = "quiet";
char TraceRpc[] = "rpc";

void
trace(char *level, char *fmt, ...)
{
	char buf[512];
	va_list arg;

	if(level == nil || !ventilogging)
		return;
	va_start(arg, fmt);
	vsnprint(buf, sizeof buf, fmt, arg);
	va_end(arg);
	vtlog(level, "<font size=-1>%T %s:</font> %s<br>\n",
			threadgetname(), buf);
	vtlog("all", "<font size=-1>%T <font color=#777777>%s</font> %s:</font> %s<br>\n",
			level, threadgetname(), buf);
}

void
traceinit(void)
{
}

void
settrace(char *trace)
{
	USED(trace);
}