// -*- c++ -*- // Generated by assa-genesis //------------------------------------------------------------------------------ // $Id: LogServer-main.cpp,v 1.3 2006/07/20 02:30:55 vlg Exp $ //------------------------------------------------------------------------------ // LogServer-main.cpp //------------------------------------------------------------------------------ // Copyright (c) 2003,2006 by Vladislav Grinchenko // // 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 17:31:20 2003 // //------------------------------------------------------------------------------ static const char help_msg[]= " \n" " NAME: \n" " \n" " assa-logd logging daemon \n" " \n" " DESCRIPTION: \n" " \n" " Logging daemon from libASSA Programmer's Manual \n" " \n" " USAGE: \n" " \n" " shell> assa-logd --port=PORT@HOST --monitor-port=PORT@HOST [OPTIONS] \n" " \n" " OPTIONS: \n" " \n" " -p, --port=NAME - Applications traffic listening port \n" " (default: assalogd@localhost) \n" " --monitor-port=PORT@HOST - Monitor clients listening port \n" " \n" " (default: assalmon@localhost) \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" " --log-dir=PATH - Valid path to the store all the log files. \n" " -m, --mask=MASK - Mask (default: ALL = 0x7fffffff) \n" " \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" " \n"; //------------------------------------------------------------------------------ #include "LogServer-main.h" #include "LogServer.h" int main (int argc, char* argv[]) { static const char release[] = "1.0.1"; int patch_level = 0; LOGSERVER->set_version (release, patch_level); LOGSERVER->set_author ("Vladislav Grinchenko"); LOGSERVER->set_flags (ASSA::GenServer::RMLOG); LOGSERVER->init (&argc, argv, help_msg); LOGSERVER->init_service (); LOGSERVER->process_events (); return LOGSERVER->get_exit_value (); }