Skip to content
Newer
Older
100644 98 lines (76 sloc) 3.22 KB
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored Apr 1, 2006
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
3 /* Cherokee
4 *
5 * Authors:
6 * Alvaro Lopez Ortega <alvaro@alobbs.com>
7 *
920e20b @alobbs Happy new year!
alobbs authored Jan 14, 2011
8 * Copyright (C) 2001-2011 Alvaro Lopez Ortega
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored Apr 1, 2006
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of version 2 of the GNU General Public
12 * License as published by the Free Software Foundation.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
2c39092 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@2660 5dc97367-9…
alobbs authored Jan 2, 2009
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 * 02110-1301, USA.
72f6444 @alobbs Clean up: Trims trailing spaces.
alobbs authored Dec 13, 2009
23 */
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored Apr 1, 2006
24
25 #if !defined (CHEROKEE_INSIDE_CHEROKEE_H) && !defined (CHEROKEE_COMPILATION)
26 # error "Only <cherokee/cherokee.h> can be included directly, this file may disappear or change contents."
27 #endif
28
29 #ifndef CHEROKEE_LOGGER_H
30 #define CHEROKEE_LOGGER_H
31
32 #include <cherokee/common.h>
29d5de9 @alobbs Replace almost all the PRINT_ERROR, PRINT_ERROR_S and PRINT_ERRNO by
alobbs authored Jun 29, 2009
33 #include <cherokee/buffer.h>
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored Apr 1, 2006
34 #include <cherokee/module.h>
468a464 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@3168 5dc97367-9…
alobbs authored Apr 25, 2009
35 #include <cherokee/logger_writer.h>
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored Apr 1, 2006
36
37 CHEROKEE_BEGIN_DECLS
38
0ecacd7 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@613 5dc97367-97…
alobbs authored Jan 16, 2007
39
9fc2651 @alobbs Adds support for "information collectors" (a new plug-in type). It
alobbs authored Jul 17, 2009
40 /* Virtual method prototypes
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored Apr 1, 2006
41 */
c5fe3a4 @alobbs Errors are not longer written through the logger objects. They are
alobbs authored Nov 30, 2009
42 typedef ret_t (* logger_func_new_t) (void **logger, void *vsrv, cherokee_config_node_t *config);
43 typedef ret_t (* logger_func_init_t) (void *logger);
44 typedef ret_t (* logger_func_free_t) (void *logger);
45 typedef ret_t (* logger_func_flush_t) (void *logger);
46 typedef ret_t (* logger_func_reopen_t) (void *logger);
47 typedef ret_t (* logger_func_write_access_t) (void *logger, void *conn);
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored Apr 1, 2006
48
49
50 typedef struct {
b69d2e0 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@476 5dc97367-97…
alobbs authored Nov 30, 2006
51 cherokee_module_t module;
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored Apr 1, 2006
52 struct cherokee_logger_private *priv;
39b66dc @alobbs Loggers can now be configured to manage different time standards.
alobbs authored Dec 4, 2009
53 cherokee_boolean_t utc_time;
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored Apr 1, 2006
54
55 /* Pure virtual methods
56 */
b69d2e0 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@476 5dc97367-97…
alobbs authored Nov 30, 2006
57 logger_func_flush_t flush;
58 logger_func_reopen_t reopen;
59 logger_func_write_access_t write_access;
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored Apr 1, 2006
60 } cherokee_logger_t;
61
3560f76 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@620 5dc97367-97…
alobbs authored Jan 18, 2007
62 #define LOGGER(x) ((cherokee_logger_t *)(x))
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored Apr 1, 2006
63
64
b69d2e0 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@476 5dc97367-97…
alobbs authored Nov 30, 2006
65 /* Easy initialization
66 */
67 #define PLUGIN_INFO_LOGGER_EASY_INIT(name) \
68 PLUGIN_INFO_INIT(name, cherokee_logger, \
69 (void *)cherokee_logger_ ## name ## _new, \
70 (void *)NULL)
71
72 #define PLUGIN_INFO_LOGGER_EASIEST_INIT(name) \
73 PLUGIN_EMPTY_INIT_FUNCTION(name) \
74 PLUGIN_INFO_LOGGER_EASY_INIT(name)
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored Apr 1, 2006
75
76
b69d2e0 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@476 5dc97367-97…
alobbs authored Nov 30, 2006
77 /* Logger methods
78 */
4b729c5 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@3057 5dc97367-9…
alobbs authored Apr 3, 2009
79 ret_t cherokee_logger_init_base (cherokee_logger_t *logger,
80 cherokee_plugin_info_t *info,
81 cherokee_config_node_t *config);
b69d2e0 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@476 5dc97367-97…
alobbs authored Nov 30, 2006
82
83 /* Logger virtual methods
84 */
c5fe3a4 @alobbs Errors are not longer written through the logger objects. They are
alobbs authored Nov 30, 2009
85 ret_t cherokee_logger_init (cherokee_logger_t *logger);
86 ret_t cherokee_logger_free (cherokee_logger_t *logger);
b69d2e0 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@476 5dc97367-97…
alobbs authored Nov 30, 2006
87
c5fe3a4 @alobbs Errors are not longer written through the logger objects. They are
alobbs authored Nov 30, 2009
88 ret_t cherokee_logger_reopen (cherokee_logger_t *logger);
89 ret_t cherokee_logger_flush (cherokee_logger_t *logger);
90 ret_t cherokee_logger_write_access (cherokee_logger_t *logger, void *conn);
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored Apr 1, 2006
91
c5fe3a4 @alobbs Errors are not longer written through the logger objects. They are
alobbs authored Nov 30, 2009
92 ret_t cherokee_logger_set_backup_mode (cherokee_logger_t *logger, cherokee_boolean_t active);
93 ret_t cherokee_logger_get_backup_mode (cherokee_logger_t *logger, cherokee_boolean_t *active);
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored Apr 1, 2006
94
95 CHEROKEE_END_DECLS
96
97 #endif /* CHEROKEE_LOGGER_H */
Something went wrong with that request. Please try again.