.TP
.B "-d\fR,\fP --debug"
-Don't run as daemon (do not fork and put itself into background).
+Don't run as daemon (do not fork and put itself into background). Additional diagnostics are not enabled, they can be configured through log4c instead.
.TP
.BI \-i " FILE" "\fR,\fP --pidfile " FILE
.I PATH.
.TP
-.B "-v\fR,\fP --verbose"
-Print extensive debug output.
-
-.TP
.B "-V\fR,\fP --version"
Print version and exit.
.TP
.B "-d\fR,\fP --debug"
-Don't run as daemon, print additional diagnostics.
-
-.TP
-.B "-v\fR,\fP --verbose"
-Print extensive debug output.
+Don't run as daemon. Additional diagnostics are not enabled, they can be configured through log4c instead.
.TP
.BI \-p " NUM" "\fR,\fP --port " NUM
" -h, --help display this help and exit\n"
" -V, --version output version information and exit\n"
" -d, --debug do not run as daemon\n"
- " -v, --verbose print extensive debug output\n"
" -f, --file-prefix <prefix> path and prefix for event files\n"
" -c, --cert <file> location of server certificate\n"
" -k, --key <file> location of server private key\n"
/* Option flags and variables */
static int debug;
-static int verbose = 0;
char *file_prefix = DEFAULT_PREFIX;
int bs_only = 0;
int lazy_close = 1;
{
{"help", no_argument, 0, 'h'},
{"version", no_argument, 0, 'V'},
- {"verbose", no_argument, 0, 'v'},
{"debug", no_argument, 0, 'd'},
{"file-prefix", required_argument, 0, 'f'},
{"cert", required_argument, 0, 'c'},
"f:" /* file prefix */
"h" /* help */
"V" /* version */
- "v" /* verbose */
"c:" /* certificate */
"k:" /* key */
"C:" /* CA dir */
printf ("interlogger %s\n", VERSION);
exit (0);
- case 'v':
- verbose = 1;
- break;
-
case 'h':
usage (0);
.TP
.B "-d\fR,\fP --debug"
-Don't run as daemon, print additional diagnostics.
+Don't run as daemon. Additional diagnostics are not enabled, they can be configured through log4c instead.
.TP
.B "-r\fR,\fP --rgmaexport"
#define GLITE_LBPROXY_SOCK_PREFIX "/tmp/lb_proxy_"
#endif
-#ifndef dprintf
-#define dprintf(x) { if (debug) printf x; }
-#endif
-
#define sizofa(a) (sizeof(a)/sizeof((a)[0]))
#define SERVICE_PROXY DB_PROXY_JOB
{"notif-il-fprefix", 1, NULL, 'Y'},
{"count-statistics", 1, NULL, 'T'},
{"request-timeout", 1, NULL, 't'},
- {"silent", 0, NULL, 'z' },
#ifdef LB_PERF
{"perf-sink", 1, NULL, 'K'},
#endif
"\t-w, --wsport\t port to serve the web services requests\n"
#endif /* GLITE_LB_SERVER_WITH_WS */
"\t-m, --mysql\t database connect string\n"
- "\t-d, --debug\t don't run as daemon, additional diagnostics\n"
+ "\t-d, --debug\t don't run as daemon\n"
"\t-r, --rgmaexport write state info to RGMA interface\n"
"\t-n, --noauth\t don't check user identity with result owner\n"
"\t-s, --slaves\t number of slave servers to fork\n"
"\t--count-statistics=1\t count certain statistics on jobs\n"
"\t =2\t ... and allow anonymous access\n"
"\t-t, --request-timeout\t request timeout for one client\n"
- "\t--silent\t don't print diagnostic, even if -d is on\n"
#ifdef LB_PERF
"\t-K, --perf-sink\t where to sink events\n"
#endif
edg_wll_GssStatus gss_code;
struct timeval to;
int request_timeout = REQUEST_TIMEOUT;
- int silent = 0;
char socket_path_prefix[PATH_MAX] = GLITE_LBPROXY_SOCK_PREFIX;
case 'w': free(ws_port); ws_port = strdup(optarg); break;
#endif /* GLITE_LB_SERVER_WITH_WS */
case 'd': debug = 1; break;
- case 'z': silent = 1; break;
case 'r': rgma_export = 1; break;
case 'm': dbstring = optarg; break;
case 'n': noAuth = 1; break;
setpgid(0, getpid());
}
- if (silent) debug = 0;
-
glite_srvbones_set_param(GLITE_SBPARAM_SLAVES_COUNT, slaves);
glite_srvbones_set_param(GLITE_SBPARAM_SLAVE_OVERLOAD, SLAVE_OVERLOAD);
glite_srvbones_set_param(GLITE_SBPARAM_SLAVE_CONNS_MAX, SLAVE_CONNS_MAX);
#include "glite/lb/context-int.h"
#include "glite/lbu/log.h"
-extern int debug; // declared and set in bkserver.c
-
int edg_wll_SetErrorDB(edg_wll_Context ctx) {
int code;
#include "db_supp.h"
#include "index.h"
-extern int debug;
-
#define const_len(c) (sizeof((c))-1)
static int parse_indices(edg_wll_Context ctx,char **keys,char ***column_names,const char **built_in_indices,edg_wll_QueryRec *** index_out,char ***keys_out);
#include "lb_http.h"
#include "lb_proto.h"
-extern int debug;
-#define dprintf(x) if (debug) printf x
-
int edg_wll_AcceptHTTP(edg_wll_Context ctx, char **body, char **resp, char ***hdrOut, char **bodyOut, int *httpErr)
{
static int notif_match_conditions(edg_wll_Context,const edg_wll_JobStat *,const edg_wll_JobStat *,const char *);
static int notif_check_acl(edg_wll_Context,const edg_wll_JobStat *,const char *, int *);
-extern int debug;
-
int edg_wll_NotifExpired(edg_wll_Context,const char *);
int edg_wll_NotifMatch(edg_wll_Context ctx, const edg_wll_JobStat *oldstat, const edg_wll_JobStat *stat)
#include "ws_typeref.h"
#include "jobstat.h"
-extern int debug;
-
#define LB_GLUE_STATE_PREFIX "urn:org.glite.lb"
/**
}
flags = 0;
- if (debug) {
+ if (glite_common_log_get_priority(LOG_CATEGORY_LB_SERVER_REQUEST) >= LOG_PRIORITY_DEBUG) {
char *cjobid = NULL, *cflags = NULL;
cjobid = edg_wlc_JobIdUnparse(j);
}
flags = EDG_WLL_STAT_CLASSADS | EDG_WLL_STAT_CHILDREN;
- if (debug) {
+ if (glite_common_log_get_priority(LOG_CATEGORY_LB_SERVER_REQUEST) >= LOG_PRIORITY_DEBUG) {
char *cjobid = NULL, *cflags = NULL;
cjobid = edg_wlc_JobIdUnparse(j);
#define __lb__QueryEvents __ns1__QueryEvents
#endif
-extern int debug;
-#define dprintf(x) if (debug) printf x
-
static void freeQueryRecsExt(edg_wll_QueryRec **qr);
static void freeJobIds(edg_wlc_JobId *jobs);
static void freeJobStats(edg_wll_JobStat *stats);
edg_wll_SoapToJobStatFlags(in->flags, &flags);
- if (debug) {
+ if (glite_common_log_get_priority(LOG_CATEGORY_LB_SERVER_REQUEST) >= LOG_PRIORITY_DEBUG) {
char *cjobid = NULL, *cflags = NULL;
cjobid = edg_wlc_JobIdUnparse(j);
}
edg_wll_SoapToJobStatFlags(in->flags, &flags);
- if (debug) {
+ if (glite_common_log_get_priority(LOG_CATEGORY_LB_SERVER_REQUEST) >= LOG_PRIORITY_DEBUG) {
char *message = NULL;
if (edg_wll_QueryJobsRequestToXML(ctx,
goto cleanup;
}
- if (debug) {
+ if (glite_common_log_get_priority(LOG_CATEGORY_LB_SERVER_REQUEST) >= LOG_PRIORITY_DEBUG) {
char *message = NULL;
if (edg_wll_QueryEventsRequestToXML(ctx,
#define NEW_CLIENT_DURATION 10 /* how long a client is considered new, i.e. busy
connection is not closed to serve other clients */
-#ifndef dprintf
-#define dprintf(x) { if (debug) printf x; }
-#endif
-
#ifdef LB_PROF
extern void _start (void), etext (void);
#endif
static int running = 0;
-static int debug = 0;
static volatile int die = 0,
child_died = 0;
static unsigned long clnt_dispatched = 0,
services = service_table;
services_ct = table_sz;
- debug = dbg;
setlinebuf(stdout);
setlinebuf(stderr);
alen = sizeof(a);
if ( (conn = accept(sock, (struct sockaddr *)&a, &alen)) < 0 )
{
- //TODO: check debug according to previous version
-#if 0
- if (debug)
- {
- perror("accept()");
- return 1;
- }
- else
- {
- syslog(LOG_ERR, "accept(): %m");
- sleep(5);
- return -1;
- }
-#endif
glite_common_log(set_log_category, LOG_PRIORITY_WARN, "accept()");
sleep(5);
return -1;