]>
Commit | Line | Data |
---|---|---|
5991a55c KB |
1 | #ifndef TRACE_H |
2 | #define TRACE_H | |
3 | ||
4 | #include "git-compat-util.h" | |
5 | #include "strbuf.h" | |
6 | ||
6aa30857 KB |
7 | struct trace_key { |
8 | const char * const key; | |
9 | int fd; | |
10 | unsigned int initialized : 1; | |
11 | unsigned int need_close : 1; | |
12 | }; | |
13 | ||
14 | #define TRACE_KEY_INIT(name) { "GIT_TRACE_" #name, 0, 0, 0 } | |
15 | ||
5991a55c KB |
16 | __attribute__((format (printf, 1, 2))) |
17 | extern void trace_printf(const char *format, ...); | |
18 | __attribute__((format (printf, 2, 3))) | |
19 | extern void trace_argv_printf(const char **argv, const char *format, ...); | |
20 | extern void trace_repo_setup(const char *prefix); | |
6aa30857 KB |
21 | extern int trace_want(struct trace_key *key); |
22 | extern void trace_disable(struct trace_key *key); | |
5991a55c | 23 | __attribute__((format (printf, 2, 3))) |
6aa30857 | 24 | extern void trace_printf_key(struct trace_key *key, const char *format, ...); |
c69dfd24 | 25 | extern void trace_strbuf(struct trace_key *key, const struct strbuf *data); |
5991a55c KB |
26 | |
27 | #endif /* TRACE_H */ |