1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
// -*- c++ -*-
// Generated by assa-genesis
//------------------------------------------------------------------------------
// $Id: LogMon-main.cpp,v 1.3 2006/07/20 02:30:55 vlg Exp $
//------------------------------------------------------------------------------
// LogMon-main.cpp
//------------------------------------------------------------------------------
// Copyright (c) YEAR by YOUR-NAME
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version
// 2 of the License, or (at your option) any later version.
//------------------------------------------------------------------------------
//
// Date : Thu Apr 17 22:49:49 2003
//
//------------------------------------------------------------------------------
static const char help_msg[]=
" \n"
" NAME: \n"
" \n"
" assa-logmon example \n"
" \n"
" DESCRIPTION: \n"
" \n"
" Log monitor implementation from libASSA Programmer's Manual. \n"
" \n"
" USAGE: \n"
" \n"
" shell> assa-logmon [OPTIONS] \n"
" \n"
" OPTIONS: \n"
" \n"
" -b, --daemon BOOL - Run process as true UNIX daemon \n"
" -l, --pidfile PATH - The process ID is written to the lockfile PATH \n"
" instead of default ~/.{procname}.pid \n"
" -L, --ommit-pidfile BOOL - Do not create PID lockfile \n"
" \n"
" -D, --log-file NAME - Write debug to NAME file \n"
" -d, --log-stdout BOOL - Write debug to standard output \n"
" -z, --log-size NUM - Maximum size debug file can reach (dfl: is 10Mb) \n"
" \n"
" -m, --mask MASK - Mask (default: ALL = 0x7fffffff) \n"
" -p, --port NAME - The tcp/ip port NAME (default - procname) \n"
" -n, --instance NUM - Process instance NUM (default - none) \n"
" -f, --config-file NAME - Alternative configuration file NAME \n"
" \n"
" -h, --help - Print this messag \n"
" -v, --version - Print version number \n";
//------------------------------------------------------------------------------
#include "LogMon-main.h"
#include "LogMon.h"
int
main (int argc, char* argv[])
{
static const char release[] = "VERSION";
int patch_level = 0;
LOGMON->set_version (release, patch_level);
LOGMON->set_author ("YOUR-NAME");
LOGMON->set_flags (ASSA::GenServer::RMLOG);
LOGMON->init (&argc, argv, help_msg);
LOGMON->init_service ();
LOGMON->process_events ();
return LOGMON->get_exit_value ();
}
|