2 * Copyright (C) the libgit2 contributors. All rights reserved.
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
12 #include "git2/trace.h"
16 struct git_trace_data git_trace__data
= {0};
20 int git_trace_set(git_trace_level_t level
, git_trace_cb callback
)
23 assert(level
== 0 || callback
!= NULL
);
25 git_trace__data
.level
= level
;
26 git_trace__data
.callback
= callback
;
34 git_error_set(GIT_ERROR_INVALID
,
35 "this version of libgit2 was not built with tracing.");