// -*- 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 (); }