log4cplus  2.1.0
Macros | Typedefs | Functions
clogger.h File Reference

Module: Log4CPLUS File: clogger.h Created: 01/2011 Author: Jens Rehsack. More...

#include <log4cplus/config.hxx>
Include dependency graph for clogger.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define L4CP_OFF_LOG_LEVEL   60000
 
#define L4CP_FATAL_LOG_LEVEL   50000
 
#define L4CP_ERROR_LOG_LEVEL   40000
 
#define L4CP_WARN_LOG_LEVEL   30000
 
#define L4CP_INFO_LOG_LEVEL   20000
 
#define L4CP_DEBUG_LOG_LEVEL   10000
 
#define L4CP_TRACE_LOG_LEVEL   0
 
#define L4CP_ALL_LOG_LEVEL   TRACE_LOG_LEVEL
 
#define L4CP_NOT_SET_LOG_LEVEL   -1
 
#define LOG4CPLUS_TEXT2(STRING)   STRING
 
#define LOG4CPLUS_TEXT(STRING)   LOG4CPLUS_TEXT2(STRING)
 

Typedefs

typedef void * log4cplus_logger_t
 
typedef log4cplus_logger_t logger_t
 
typedef int log4cplus_loglevel_t
 
typedef log4cplus_loglevel_t loglevel_t
 
typedef char log4cplus_char_t
 
typedef void(* log4cplus_log_event_callback_t) (void *cookie, log4cplus_char_t const *message, log4cplus_char_t const *loggerName, log4cplus_loglevel_t ll, log4cplus_char_t const *thread, log4cplus_char_t const *thread2, unsigned long long timestamp_secs, unsigned long timestamp_usecs, log4cplus_char_t const *file, log4cplus_char_t const *function, int line)
 CallbackAppender callback type. More...
 

Functions

LOG4CPLUS_EXPORT void * log4cplus_initialize (void)
 
LOG4CPLUS_EXPORT int log4cplus_deinitialize (void *initializer)
 
LOG4CPLUS_EXPORT int log4cplus_file_configure (const log4cplus_char_t *pathname)
 
LOG4CPLUS_EXPORT int log4cplus_file_reconfigure (const log4cplus_char_t *pathname)
 
LOG4CPLUS_EXPORT int log4cplus_str_configure (const log4cplus_char_t *config)
 
LOG4CPLUS_EXPORT int log4cplus_str_reconfigure (const log4cplus_char_t *config)
 
LOG4CPLUS_EXPORT int log4cplus_basic_configure (void)
 
LOG4CPLUS_EXPORT int log4cplus_basic_reconfigure (int logToStdErr)
 
LOG4CPLUS_EXPORT void log4cplus_shutdown (void)
 
LOG4CPLUS_EXPORT int log4cplus_logger_exists (const log4cplus_char_t *name)
 
LOG4CPLUS_EXPORT int log4cplus_logger_is_enabled_for (const log4cplus_char_t *name, log4cplus_loglevel_t ll)
 
LOG4CPLUS_EXPORT int log4cplus_logger_log (const log4cplus_char_t *name, log4cplus_loglevel_t ll, const log4cplus_char_t *msgfmt,...) LOG4CPLUS_FORMAT_ATTRIBUTE(__printf__
 
LOG4CPLUS_EXPORT int LOG4CPLUS_EXPORT int log4cplus_logger_log_str (const log4cplus_char_t *name, log4cplus_loglevel_t ll, const log4cplus_char_t *msg)
 
LOG4CPLUS_EXPORT int log4cplus_logger_force_log (const log4cplus_char_t *name, log4cplus_loglevel_t ll, const log4cplus_char_t *msgfmt,...) LOG4CPLUS_FORMAT_ATTRIBUTE(__printf__
 
LOG4CPLUS_EXPORT int LOG4CPLUS_EXPORT int log4cplus_logger_force_log_str (const log4cplus_char_t *name, log4cplus_loglevel_t ll, const log4cplus_char_t *msg)
 
LOG4CPLUS_EXPORT int log4cplus_add_callback_appender (const log4cplus_char_t *logger, log4cplus_log_event_callback_t callback, void *cookie)
 
LOG4CPLUS_EXPORT int log4cplus_add_log_level (unsigned int ll, const log4cplus_char_t *ll_name)
 
LOG4CPLUS_EXPORT int log4cplus_remove_log_level (unsigned int ll, const log4cplus_char_t *ll_name)
 

Detailed Description

Module: Log4CPLUS File: clogger.h Created: 01/2011 Author: Jens Rehsack.

Copyright 2011-2017 Jens Rehsack & Tad E. Smith

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

This header defines the C API for log4cplus and the logging macros.

Definition in file clogger.h.

Macro Definition Documentation

◆ L4CP_ALL_LOG_LEVEL

#define L4CP_ALL_LOG_LEVEL   TRACE_LOG_LEVEL

Definition at line 57 of file clogger.h.

◆ L4CP_DEBUG_LOG_LEVEL

#define L4CP_DEBUG_LOG_LEVEL   10000

Definition at line 55 of file clogger.h.

◆ L4CP_ERROR_LOG_LEVEL

#define L4CP_ERROR_LOG_LEVEL   40000

Definition at line 52 of file clogger.h.

◆ L4CP_FATAL_LOG_LEVEL

#define L4CP_FATAL_LOG_LEVEL   50000

Definition at line 51 of file clogger.h.

◆ L4CP_INFO_LOG_LEVEL

#define L4CP_INFO_LOG_LEVEL   20000

Definition at line 54 of file clogger.h.

◆ L4CP_NOT_SET_LOG_LEVEL

#define L4CP_NOT_SET_LOG_LEVEL   -1

Definition at line 58 of file clogger.h.

◆ L4CP_OFF_LOG_LEVEL

#define L4CP_OFF_LOG_LEVEL   60000

Definition at line 50 of file clogger.h.

◆ L4CP_TRACE_LOG_LEVEL

#define L4CP_TRACE_LOG_LEVEL   0

Definition at line 56 of file clogger.h.

◆ L4CP_WARN_LOG_LEVEL

#define L4CP_WARN_LOG_LEVEL   30000

Definition at line 53 of file clogger.h.

◆ LOG4CPLUS_TEXT

#define LOG4CPLUS_TEXT (   STRING)    LOG4CPLUS_TEXT2(STRING)

Definition at line 72 of file clogger.h.

◆ LOG4CPLUS_TEXT2

#define LOG4CPLUS_TEXT2 (   STRING)    STRING

Definition at line 70 of file clogger.h.

Typedef Documentation

◆ log4cplus_char_t

typedef char log4cplus_char_t

Definition at line 63 of file clogger.h.

◆ log4cplus_log_event_callback_t

typedef void(* log4cplus_log_event_callback_t) (void *cookie, log4cplus_char_t const *message, log4cplus_char_t const *loggerName, log4cplus_loglevel_t ll, log4cplus_char_t const *thread, log4cplus_char_t const *thread2, unsigned long long timestamp_secs, unsigned long timestamp_usecs, log4cplus_char_t const *file, log4cplus_char_t const *function, int line)

CallbackAppender callback type.

Definition at line 105 of file clogger.h.

◆ log4cplus_logger_t

typedef void* log4cplus_logger_t

Definition at line 44 of file clogger.h.

◆ log4cplus_loglevel_t

typedef int log4cplus_loglevel_t

Definition at line 47 of file clogger.h.

◆ logger_t

Definition at line 45 of file clogger.h.

◆ loglevel_t

Definition at line 48 of file clogger.h.

Function Documentation

◆ log4cplus_add_callback_appender()

LOG4CPLUS_EXPORT int log4cplus_add_callback_appender ( const log4cplus_char_t logger,
log4cplus_log_event_callback_t  callback,
void *  cookie 
)

◆ log4cplus_add_log_level()

LOG4CPLUS_EXPORT int log4cplus_add_log_level ( unsigned int  ll,
const log4cplus_char_t ll_name 
)

◆ log4cplus_basic_configure()

LOG4CPLUS_EXPORT int log4cplus_basic_configure ( void  )

◆ log4cplus_basic_reconfigure()

LOG4CPLUS_EXPORT int log4cplus_basic_reconfigure ( int  logToStdErr)

◆ log4cplus_deinitialize()

LOG4CPLUS_EXPORT int log4cplus_deinitialize ( void *  initializer)

◆ log4cplus_file_configure()

LOG4CPLUS_EXPORT int log4cplus_file_configure ( const log4cplus_char_t pathname)

◆ log4cplus_file_reconfigure()

LOG4CPLUS_EXPORT int log4cplus_file_reconfigure ( const log4cplus_char_t pathname)

◆ log4cplus_initialize()

LOG4CPLUS_EXPORT void* log4cplus_initialize ( void  )

◆ log4cplus_logger_exists()

LOG4CPLUS_EXPORT int log4cplus_logger_exists ( const log4cplus_char_t name)

◆ log4cplus_logger_force_log()

LOG4CPLUS_EXPORT int log4cplus_logger_force_log ( const log4cplus_char_t name,
log4cplus_loglevel_t  ll,
const log4cplus_char_t msgfmt,
  ... 
)

◆ log4cplus_logger_force_log_str()

LOG4CPLUS_EXPORT int LOG4CPLUS_EXPORT int log4cplus_logger_force_log_str ( const log4cplus_char_t name,
log4cplus_loglevel_t  ll,
const log4cplus_char_t msg 
)

◆ log4cplus_logger_is_enabled_for()

LOG4CPLUS_EXPORT int log4cplus_logger_is_enabled_for ( const log4cplus_char_t name,
log4cplus_loglevel_t  ll 
)

◆ log4cplus_logger_log()

LOG4CPLUS_EXPORT int log4cplus_logger_log ( const log4cplus_char_t name,
log4cplus_loglevel_t  ll,
const log4cplus_char_t msgfmt,
  ... 
)

◆ log4cplus_logger_log_str()

LOG4CPLUS_EXPORT int LOG4CPLUS_EXPORT int log4cplus_logger_log_str ( const log4cplus_char_t name,
log4cplus_loglevel_t  ll,
const log4cplus_char_t msg 
)

◆ log4cplus_remove_log_level()

LOG4CPLUS_EXPORT int log4cplus_remove_log_level ( unsigned int  ll,
const log4cplus_char_t ll_name 
)

◆ log4cplus_shutdown()

LOG4CPLUS_EXPORT void log4cplus_shutdown ( void  )

◆ log4cplus_str_configure()

LOG4CPLUS_EXPORT int log4cplus_str_configure ( const log4cplus_char_t config)

◆ log4cplus_str_reconfigure()

LOG4CPLUS_EXPORT int log4cplus_str_reconfigure ( const log4cplus_char_t config)