Nilorea Library

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Macros Groups
Data Structures | Macros | Typedefs | Functions
n_log.h File Reference
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <sys/stat.h>`
`#include "n_common.h"`
`#include <stdarg.h>`
`#include <pthread.h>`
Include dependency graph for n_log.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures

struct | TS_LOG

## Macros

#define | NOLOG -1
#define | SYSJRNL -2
#define | LOG_EMERG 0
#define | LOG_ALERT 1
#define | LOG_CRIT 2
#define | LOG_ERR 3
#define | LOG_WARNING 4
#define | LOG_NOTICE 5
#define | LOG_INFO 6
#define | LOG_DEBUG 7
#define | n_log(__LEVEL__,...)

## Typedefs

typedef struct TS_LOG | TS_LOG

## Functions

void | set_log_level (const int log_level)
| Set the global log level value ( static int LOG_LEVEL ) More...
int | get_log_level ()
| Get the global log level value. More...
int | set_log_file (char *file)
| Set the logging to a file instead of stderr. More...
FILE * | get_log_file ()
| return the current log_file More...
void | _n_log (int level, const char *file, const char *func, int line, const char *format,...)
| Logging function. log( level , const char *format , ... ) is a macro around _log. More...
int | open_safe_logging (TS_LOG **log, char *pathname, char *opt)
| Open a thread-safe logging file. More...
int | write_safe_log (TS_LOG *log, char *pat,...)
| write to a thread-safe logging file More...
int | close_safe_logging (TS_LOG *log)
| close a thread-safe logging file More...