AT&T ECOMP Vendor Event Listener library
0.1
|
Wrapper for event logging built on syslog. More...
#include <string.h>
#include <assert.h>
#include <syslog.h>
#include <stdlib.h>
#include <sys/time.h>
#include <curl/curl.h>
#include "evel.h"
Go to the source code of this file.
Functions | |
void | log_initialize (EVEL_LOG_LEVELS level, const char *ident) |
Initialize logging. More... | |
const char * | evel_error_string (void) |
Descriptive text for library errors. More... | |
void | log_error_state (char *format,...) |
void | log_debug (EVEL_LOG_LEVELS level, char *format,...) |
Generate a debug log. More... | |
Variables | |
EVEL_LOG_LEVELS | debug_level = EVEL_LOG_DEBUG |
int | debug_indent = 0 |
Wrapper for event logging built on syslog.
Copyright(c) <2016>, AT&T Intellectual Property. All other rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY AT&T INTELLECTUAL PROPERTY ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AT&T INTELLECTUAL PROPERTY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file evel_logging.c.
const char* evel_error_string | ( | void | ) |
Descriptive text for library errors.
Return a text error string that relates to the last failure. May be "<null>" but will never be NULL.
Definition at line 87 of file evel_logging.c.
void log_debug | ( | EVEL_LOG_LEVELS | level, |
char * | format, | ||
... | |||
) |
Generate a debug log.
Log debug information.
Provides an interface to syslog with formatting of the nesting level so that it's easier to see function entry/exit.
[in] | level | The debug level - see EVEL_LOG_LEVELS. |
[in] | format | The output formatting in printf style. |
[in] | ... | Variable arguments as specified in the format string. |
Definition at line 120 of file evel_logging.c.
void log_error_state | ( | char * | format, |
... | |||
) |
Definition at line 98 of file evel_logging.c.
void log_initialize | ( | EVEL_LOG_LEVELS | level, |
const char * | ident | ||
) |
Initialize logging.
[in] | level | The debugging level - one of EVEL_LOG_LEVELS. |
[in] | ident | The identifier for our logs. |
Definition at line 68 of file evel_logging.c.
int debug_indent = 0 |
Definition at line 54 of file evel_logging.c.
EVEL_LOG_LEVELS debug_level = EVEL_LOG_DEBUG |
Definition at line 52 of file evel_logging.c.