This file is indexed.

/usr/include/taningia/log.h is in libtaningia-dev 0.2.2-1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
/*
 * Copyright (C) 2009  Lincoln de Sousa <lincoln@minaslivre.org>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifndef _TANINGIA_LOG_H_
#define _TANINGIA_LOG_H_

#include <taningia/object.h>

#ifdef __cplusplus
extern "C" {
#endif

#define TA_CAST_LOG(o) ((ta_log_t *) (o))

#define MAX_DATE_SIZE 64

typedef struct _ta_log ta_log_t;

typedef enum {
  TA_LOG_DEBUG,
  TA_LOG_INFO,
  TA_LOG_WARN,
  TA_LOG_ERROR,
  TA_LOG_CRITICAL
} ta_log_level_t;

typedef int *(*ta_log_handler_func_t) (ta_log_t *, ta_log_level_t,
                                       const char *, void *);
struct _ta_log
{
  ta_object_t parent;
  char *name;
  ta_log_level_t level;
  ta_log_handler_func_t handler;
  int use_colors;
  void *handler_data;
  char *date_format;
};

/**
 * @name: ta_log::new
 * @type: constructor
 */
ta_log_t *ta_log_new (const char *domain_name);

/**
 * @name: ta_log::init
 * @type: initializer
 */
void ta_log_init (ta_log_t *log, const char *domain_name);

/**
 * @name: ta_log::set_use_colors
 * @type: setter
 */
void ta_log_set_use_colors (ta_log_t *log, int use_colors);

/**
 * @name: ta_log::get_use_colors
 * @type: getter
 */
int ta_log_get_use_colors (ta_log_t *log);

/**
 * @name: ta_log::set_level
 * @type: setter
 */
void ta_log_set_level (ta_log_t *log, ta_log_level_t level);

/**
 * @name: ta_log::get_level
 * @type: getter
 */
ta_log_level_t ta_log_get_level (ta_log_t *log);

/**
 * @name: ta_log::set_handler
 * @type: method
 * @param handler: The handler function
 * @param user_data: Parameter to be passed to the handler function
 *
 * Sets a hook to be called when any of the info, warn, debug, error
 * or critical methods of a log instance is called.
 */
void ta_log_set_handler (ta_log_t *log, ta_log_handler_func_t handler,
                         void *user_data);

/**
 * @name: ta_log::info
 * @type: method
 *
 * Log an info message.
 */
void ta_log_info (ta_log_t *log, const char *fmt, ...);

/**
 * @name: ta_log::warn
 * @type: method
 *
 * Log a warning.
 */
void ta_log_warn (ta_log_t *log, const char *fmt, ...);

/**
 * @name: ta_log::debug
 * @type: method
 *
 * Log a debug message.
 */
void ta_log_debug (ta_log_t *log, const char *fmt, ...);

/**
 * @name: ta_log::error
 * @type: method
 *
 * Log an error message.
 */
void ta_log_error (ta_log_t *log, const char *fmt, ...);

/**
 * @name: ta_log::critical
 * @type: method
 *
 * Log a critical message.
 */
void ta_log_critical (ta_log_t *log, const char *fmt, ...);

#ifdef __cplusplus
}
#endif

#endif /* _TANINGIA_TA_LOG_H_ */