Basics

The KAV SDK provides developers with the logging functionality. The main part of logging is a configuration file kave.ini. The principles of creating this file and other information are described in section "Configuration file".

Turning on logging may require a significant amount of disk space. Use logging feature only for debugging purposes. Avoid using logs in production.

To turn logging on:

When run on a Linux platform, the KAV SDK uses POSIX named semaphores, functionality provided by glibc library, to send logging notifications. Named semaphores are used both in out-of-process mode, when logging information is sent from kavehost process, and in-process mode when this data is sent from your own hosing process. POSIX named semaphores provide for interprocess communication and deliver synchronization between processes and threads effectively allowing you to change SDK logging settings at the runtime without having to restart and reinitialize the KAV SDK to get changes to logging settings applied. This might be useful when you need to vary logging detail and change from superficial to thorough logging within the same KAV SDK runtime session.

Named semaphores are not supported by Posix 1003.1c thread package implemented in the LinuxThreads package within GNU C (glibc) library, which is now considered obsolete and is being replaced in glibc by Native POSIX Threading Library (NTPL). This latter library provides for better compliance with threading specification in POSIX standard and, among other features, supports named semaphores.

When turning logging on a Linux platform, make sure you have configured the glibc library to use NTPL threading library. To do that, specify the --enable-add-ons=nptl switch parameter in the command line for the GCC compiler when configuring the glibc library. Please note that POSIX semaphore code uses the /dev/shm tmpfs to create named semaphores in a virtual file system and share them between processes. Make sure to mount the /dev/shm as a tempfs file system to ensure semaphore files are successfully created at the runtime. You can list mounted file systems by the df –h command. If you need to change default settings for the /dev/shm tempfs, edit the /etc/fstab file.

When the in-process integration mode is used, the configuration file kave.ini should be located in the directory from which the application is running.

When KAV SDK is running in out-of-process mode or service mode, two configuration files should be used:

You can create the kave.ini file as described in section "Configuration file", or appeal for the configuration file to your Technical Account Manager.

To turn logging off:

Page top