]>
git.proxmox.com Git - pve-cluster.git/blob - data/src/logger.h
866c9e0362fd9f5b2412ce95b71c3990095b1c50
2 Copyright (C) 2010 Proxmox Server Solutions GmbH
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Affero General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Affero General Public License for more details.
14 You should have received a copy of the GNU Affero General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Author: Dietmar Maurer <dietmar@proxmox.com>
21 #ifndef _PVE_LOGGER_H_
22 #define _PVE_LOGGER_H_
24 #define CLOG_MAX_ENTRY_SIZE 4096
25 #define CLOG_DEFAULT_SIZE (8192*16)
27 typedef struct clog_base clog_base_t
;
29 typedef struct clusterlog clusterlog_t
;
34 uint32_t uid
; /* unique id */
37 uint64_t ident_digest
;
51 clusterlog_destroy(clusterlog_t
*cl
);
56 unsigned int *res_len
);
66 ...) G_GNUC_PRINTF (6, 7);
71 const clog_entry_t
*entry
);
88 clog_new(uint32_t size
);
91 clog_size(clog_base_t
*clog
);
94 clog_dump(clog_base_t
*clog
);
104 clog_sort(clog_base_t
*clog
);
108 clog_entry_t
*buffer
,
118 clog_entry_size(const clog_entry_t
*entry
);
123 const clog_entry_t
*entry
);
125 #endif /* _PVE_LOGGER_H_ */