OpFlex Framework 1.7.0
ofloghandler_c.h
Go to the documentation of this file.
1/* -*- C -*-; c-basic-offset: 4; indent-tabs-mode: nil */
6/*
7 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
8 *
9 * This program and the accompanying materials are made available under the
10 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
11 * and is available at http://www.eclipse.org/legal/epl-v10.html
12 */
13
14#include "ofcore_c.h"
15
16#pragma once
17#ifndef OPFLEX_C_OFLOGHANDLER_H
19#define OPFLEX_C_OFLOGHANDLER_H
21
29
42
55typedef void (*loghandler_p)(const char* file, int line,
56 const char* function, int level,
57 const char* message);
58
62#define LOG_TRACE 10
63
67#define LOG_DEBUG4 20
68
72#define LOG_DEBUG3 30
73
77#define LOG_DEBUG2 40
78
82#define LOG_DEBUG1 50
83
87#define LOG_INFO 60
88
92#define LOG_WARNING 70
93
97#define LOG_ERROR 80
98
102#define LOG_FATAL 90
103
104#ifdef __cplusplus
105extern "C" {
106#endif
117
118#ifdef __cplusplus
119} /* extern "C" */
120#endif
121
125
126#endif /* OPFLEX_C_OFLOGHANDLER_H */
int ofstatus
An opflex status code.
Definition ofcore_c.h:84
void(* loghandler_p)(const char *file, int line, const char *function, int level, const char *message)
Process a single log message.
Definition ofloghandler_c.h:55
ofstatus ofloghandler_register(int level, loghandler_p handler)
Register a new log handler.
C wrapper core defininitions.