![]() |
|
|||
File indexing completed on 2025-03-13 09:12:25
0001 /* 0002 * Copyright (C) the libgit2 contributors. All rights reserved. 0003 * 0004 * This file is part of libgit2, distributed under the GNU GPL v2 with 0005 * a Linking Exception. For full terms see the included COPYING file. 0006 */ 0007 #ifndef INCLUDE_git_trace_h__ 0008 #define INCLUDE_git_trace_h__ 0009 0010 #include "common.h" 0011 #include "types.h" 0012 0013 /** 0014 * @file git2/trace.h 0015 * @brief Git tracing configuration routines 0016 * @defgroup git_trace Git tracing configuration routines 0017 * @ingroup Git 0018 * @{ 0019 */ 0020 GIT_BEGIN_DECL 0021 0022 /** 0023 * Available tracing levels. When tracing is set to a particular level, 0024 * callers will be provided tracing at the given level and all lower levels. 0025 */ 0026 typedef enum { 0027 /** No tracing will be performed. */ 0028 GIT_TRACE_NONE = 0, 0029 0030 /** Severe errors that may impact the program's execution */ 0031 GIT_TRACE_FATAL = 1, 0032 0033 /** Errors that do not impact the program's execution */ 0034 GIT_TRACE_ERROR = 2, 0035 0036 /** Warnings that suggest abnormal data */ 0037 GIT_TRACE_WARN = 3, 0038 0039 /** Informational messages about program execution */ 0040 GIT_TRACE_INFO = 4, 0041 0042 /** Detailed data that allows for debugging */ 0043 GIT_TRACE_DEBUG = 5, 0044 0045 /** Exceptionally detailed debugging data */ 0046 GIT_TRACE_TRACE = 6 0047 } git_trace_level_t; 0048 0049 /** 0050 * An instance for a tracing function 0051 */ 0052 typedef void GIT_CALLBACK(git_trace_cb)(git_trace_level_t level, const char *msg); 0053 0054 /** 0055 * Sets the system tracing configuration to the specified level with the 0056 * specified callback. When system events occur at a level equal to, or 0057 * lower than, the given level they will be reported to the given callback. 0058 * 0059 * @param level Level to set tracing to 0060 * @param cb Function to call with trace data 0061 * @return 0 or an error code 0062 */ 0063 GIT_EXTERN(int) git_trace_set(git_trace_level_t level, git_trace_cb cb); 0064 0065 /** @} */ 0066 GIT_END_DECL 0067 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |