Sha256: e2c0dac162f8dadd117e73e1254097732dd07d14ad6fbde7d3997da1893fade2

Contents?: true

Size: 1.73 KB

Versions: 69

Compression:

Stored size: 1.73 KB

Contents

/*
 * Copyright (C) the libgit2 contributors. All rights reserved.
 *
 * This file is part of libgit2, distributed under the GNU GPL v2 with
 * a Linking Exception. For full terms see the included COPYING file.
 */
#ifndef INCLUDE_git_trace_h__
#define INCLUDE_git_trace_h__

#include "common.h"
#include "types.h"

/**
 * @file git2/trace.h
 * @brief Git tracing configuration routines
 * @defgroup git_trace Git tracing configuration routines
 * @ingroup Git
 * @{
 */
GIT_BEGIN_DECL

/**
 * Available tracing levels.  When tracing is set to a particular level,
 * callers will be provided tracing at the given level and all lower levels.
 */
typedef enum {
	/** No tracing will be performed. */
	GIT_TRACE_NONE = 0,

	/** Severe errors that may impact the program's execution */
	GIT_TRACE_FATAL = 1,

	/** Errors that do not impact the program's execution */
	GIT_TRACE_ERROR = 2,

	/** Warnings that suggest abnormal data */
	GIT_TRACE_WARN = 3,

	/** Informational messages about program execution */
	GIT_TRACE_INFO = 4,

	/** Detailed data that allows for debugging */
	GIT_TRACE_DEBUG = 5,

	/** Exceptionally detailed debugging data */
	GIT_TRACE_TRACE = 6
} git_trace_level_t;

/**
 * An instance for a tracing function
 */
typedef void (*git_trace_callback)(git_trace_level_t level, const char *msg);

/**
 * Sets the system tracing configuration to the specified level with the
 * specified callback.  When system events occur at a level equal to, or
 * lower than, the given level they will be reported to the given callback.
 *
 * @param level Level to set tracing to
 * @param cb Function to call with trace data
 * @return 0 or an error code
 */
GIT_EXTERN(int) git_trace_set(git_trace_level_t level, git_trace_callback cb);

/** @} */
GIT_END_DECL
#endif

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
rugged-0.24.5 vendor/libgit2/include/git2/trace.h
rugged-0.25.0 vendor/libgit2/include/git2/trace.h
rugged-0.25.0b10 vendor/libgit2/include/git2/trace.h
rugged-0.25.0b9 vendor/libgit2/include/git2/trace.h
rugged-0.25.0b8 vendor/libgit2/include/git2/trace.h
rugged-0.25.0b7 vendor/libgit2/include/git2/trace.h
rugged-0.25.0b6 vendor/libgit2/include/git2/trace.h
rugged-0.25.0b5 vendor/libgit2/include/git2/trace.h
rugged-0.25.0b4 vendor/libgit2/include/git2/trace.h
rugged-0.25.0b3 vendor/libgit2/include/git2/trace.h
rugged-0.25.0b2 vendor/libgit2/include/git2/trace.h
rugged-0.25.0b1 vendor/libgit2/include/git2/trace.h
rugged-0.24.0 vendor/libgit2/include/git2/trace.h
rugged-0.24.0b14 vendor/libgit2/include/git2/trace.h
rugged-0.24.0b13 vendor/libgit2/include/git2/trace.h
rugged-0.24.0b12 vendor/libgit2/include/git2/trace.h
rugged-0.24.0b11 vendor/libgit2/include/git2/trace.h
rugged-0.24.0b9 vendor/libgit2/include/git2/trace.h
rugged-0.24.0b8 vendor/libgit2/include/git2/trace.h
rugged-0.24.0b7 vendor/libgit2/include/git2/trace.h