От: | SchweinDeBurg | http://zarezky.spb.ru/ | |
Дата: | 20.06.08 04:41 | ||
Оценка: |
A tutorial on using the Pantheios logging API library with Visual Studio, and customising output behaviour using callback back-ends.
A user of the Pantheios logging API library wished to know how to use the callback functionality of the be.WindowsConsole back-end. This article describes how to do that, and also provides a general tutorial for how to select Pantheios back-ends in a Windows application. I'm going to be using Visual Studio 2005; users of other IDEs should be able to readily translate the necessary steps to their chosen toolset(s). The article takes the form of a series of instructions, and pertinent information about the steps involved are given as we go, in a loosely test-driven manner, as follows:
Create the project, and adjust the character-encoding settings
Write some logging code
Install and build Pantheios (and STLSoft)
Satisfy the compiler (by adjusting project settings) to let it know where to find the library headers
Satisfy the linker (by adjusting project settings) to let it know where to find the object libraries
Run the program
Incorporate callback functionality to customise the behaviour of be.WindowsConsole.