Click here to Skip to main content
15,886,362 members
Articles / Programming Languages / C++

An Introduction to Pantheios Back-ends, Part 1: The Back-end API

Rate me:
Please Sign up or sign in to vote.
4.95/5 (14 votes)
10 Sep 2008BSD7 min read 46.4K   138   24  
An introduction to the Pantheios logging API library's Back-end API, along with a trivial example to illustrate the concepts
/* /////////////////////////////////////////////////////////////////////////
 * File:        main.c
 *
 * Purpose:     Implementation file for the trivial_backend project.
 *
 * Created:     9th September 2008
 * Updated:     9th September 2008
 *
 * Status:      Wizard-generated
 *
 * License:     (Licensed under the Synesis Software Open License)
 *
 *              Copyright (c) 2008, Synesis Software Pty Ltd.
 *              All rights reserved.
 *
 *              www:        http://www.synesis.com.au/software
 *
 * ////////////////////////////////////////////////////////////////////// */


/* Pantheios Header Files */
#include <pantheios/pantheios.h>

/* STLSoft Header Files */
#include <stlsoft/stlsoft.h>
#include <platformstl/platformstl.h>

/* Standard C Header Files */
#include <stdio.h>
#include <stdlib.h>

#if defined(_MSC_VER) && \
    defined(_DEBUG)
# include <crtdbg.h>
#endif /* _MSC_VER) && _DEBUG */

/* /////////////////////////////////////////////////////////////////////////
 * Globals
 */

const char PANTHEIOS_FE_PROCESS_IDENTITY[]    =   "trivial_backend";

/* ////////////////////////////////////////////////////////////////////// */

int main(int argc, char** argv)
{
	int res = pantheios_init();

	if(res >= 0)
	{
		pantheios_logprintf(PANTHEIOS_SEV_NOTICE, "Hello %s", "world");

		pantheios_uninit();
	}

    ((void)argc);
    ((void)argv);
    /* . */
    return EXIT_SUCCESS;
}

/* ////////////////////////////////////////////////////////////////////// */

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The BSD License


Written By
Instructor / Trainer
Australia Australia
Software Development consultant, specialising in project remediation.

Creator of the FastFormat, Pantheios, STLSoft and VOLE open-source libraries.

Author of the books Extended STL, volume 1 (Addison-Wesley, 2007) and Imperfect C++ (Addison-Wesley, 2004).

Comments and Discussions