TIBCO FTL®
|
Start and stop FTL
Log levels.
More...
Macros | |
#define | TIB_COMPATIBILITY_VERSION (2) |
Compiled compatibility version. More... | |
Log Level Constants | |
tib_SetLogLevel supports these constants as log level values. | |
#define | TIB_LOG_LEVEL_OFF "off" |
Off – disable all tracing. More... | |
#define | TIB_LOG_LEVEL_SEVERE "severe" |
Severe – output trace entries only for severe events. More... | |
#define | TIB_LOG_LEVEL_WARN "warn" |
Warn – output trace entries for warning and severe events. More... | |
#define | TIB_LOG_LEVEL_INFO "info" |
Info – output trace entries for information, warning and severe events. More... | |
#define | TIB_LOG_LEVEL_VERBOSE "verbose" |
Verbose – output trace entries verbose, information, warning and severe events. More... | |
#define | TIB_LOG_LEVEL_DEBUG "debug" |
Debug – output trace entries for all events (debug, verbose, information, warning and severe events). More... | |
Typedefs | |
typedef void(* | tibLogCallback) (tibDateTime timestamp, const char *statement, void *closure) |
Log callback. More... | |
Functions | |
TIB_API void | tib_Close (tibEx e) |
Cleanup FTL. More... | |
TIB_API void | tib_Open (tibEx e, tibint32_t compatible_version) |
Initialize FTL. More... | |
TIB_API void | tib_SetLogCallback (tibEx e, tibLogCallback logCallback, tibProperties properties, void *closure) |
Register a global log callback. More... | |
TIB_API void | tib_SetLogFiles (tibEx e, const char *filePrefix, tibint64_t maxFileSize, tibint32_t maxFiles, tibProperties properties) |
Arrange rotating log files. More... | |
TIB_API void | tib_SetLogLevel (tibEx e, const char *level) |
Set the FTL log trace level. More... | |
TIB_API const char * | tib_Version (void) |
Release string identifying the linked FTL library. More... | |
Start and stop FTL
Log levels.
This file defines calls that start and stop FTL, and configure logging.
#define TIB_COMPATIBILITY_VERSION (2) |
Compiled compatibility version.
Your program must compile and link the same compatibility version of the FTL library. tib_Open checks this correspondence, and fails if they do not match. This constant defines the compiled compatibility version (which is independent of the software release version).
#define TIB_LOG_LEVEL_DEBUG "debug" |
Debug – output trace entries for all events (debug, verbose, information, warning and severe events).
#define TIB_LOG_LEVEL_INFO "info" |
Info – output trace entries for information, warning and severe events.
#define TIB_LOG_LEVEL_OFF "off" |
Off – disable all tracing.
#define TIB_LOG_LEVEL_SEVERE "severe" |
Severe – output trace entries only for severe events.
#define TIB_LOG_LEVEL_VERBOSE "verbose" |
Verbose – output trace entries verbose, information, warning and severe events.
#define TIB_LOG_LEVEL_WARN "warn" |
Warn – output trace entries for warning and severe events.
typedef void(* tibLogCallback) (tibDateTime timestamp, const char *statement, void *closure) |
Log callback.
Programs may define a callback of this type, and register it to process all FTL log statements.
Log Callback Restrictions:
For important restrictions, see the section Log Output Targets in TIBCO FTL Development.
timestamp | FTL supplies the time at which it emitted the log statement. |
statement | FTL supplies the log statement. |
closure | FTL supplies this closure argument, which the program supplied to tib_SetLogCallback when registering the callback. |
TIB_API void tib_Close | ( | tibEx | e | ) |
Cleanup FTL.
This call closes (that is, terminates) FTL within your program, and reclaims related resources that tib_Open allocated and initialized.
Calls to tib_Close decrement the FTL reference counter, but actually close (that is, terminate) FTL only when the counter reaches zero.
In each program, the number of calls to tib_Open() and tib_Close() must match.
Programs must not call tib_Close within a callback.
Programs must close realm objects before closing FTL.
e | The exception object captures information about failures. |
TIB_API void tib_Open | ( | tibEx | e, |
tibint32_t | compatible_version | ||
) |
Initialize FTL.
This call opens (that is, initializes) FTL within your program, including threads and global data structures.
The first time a program calls it, this call initializes FTL. If the program (or a third-party package) calls it again, it increments a reference counter, but does not reinitialize FTL. Calls to tib_Close decrement the FTL reference counter, but actually close (that is, terminate) FTL only when the counter reaches zero.
In each program, the number of calls to tib_Open() and tib_Close() must match.
e | The exception object captures information about failures. |
compatible_version | The program must supply the constant TIB_COMPATIBILITY_VERSION. |
TIB_API void tib_SetLogCallback | ( | tibEx | e, |
tibLogCallback | logCallback, | ||
tibProperties | properties, | ||
void * | closure | ||
) |
Register a global log callback.
If you register a log callback (at most one), then FTL directs all log statements to that callback.
e | The exception object captures information about failures. |
logCallback | FTL invokes this callback to process all log statements. |
properties | Reserved for future use. To ensure forward compatibility, programmers must supply NULL . |
closure | FTL supplies this closure object to the callback with each log statement. |
TIB_API void tib_SetLogFiles | ( | tibEx | e, |
const char * | filePrefix, | ||
tibint64_t | maxFileSize, | ||
tibint32_t | maxFiles, | ||
tibProperties | properties | ||
) |
Arrange rotating log files.
The filename extension .0 indicates the current log file. Rotation shifts each file by incrementing its numeric extension. If the number of files would exceed the maximum, rotation deletes the oldest file.
e | The exception object captures information about failures. |
filePrefix | All log files begin with this filename prefix. |
maxFileSize | FTL rotates the log files when the current log file exceeds this limit (in bytes). This value must be greater than 102400 (100 kilobytes). |
maxFiles | FTL limits the number of log files to this maximum. |
properties | Reserved for future use. To ensure forward compatibility, programmers must supply NULL . |
TIB_API void tib_SetLogLevel | ( | tibEx | e, |
const char * | level | ||
) |
Set the FTL log trace level.
This call sets the global log trace level for low-level FTL internal calls.
Valid levels:
For information about tuning the log level separately for individual elements, see the topic Log Levels in the book TIBCO FTL Development.
e | The exception object captures information about failures. |
level | The call sets the level to this value. |
TIB_API const char* tib_Version | ( | void | ) |
Release string identifying the linked FTL library.
Programs can use this string to output the FTL version in a start banner or in debug output.