2005-01-20 23:22:22 +00:00
|
|
|
// Berkeley Open Infrastructure for Network Computing
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2005 University of California
|
2002-04-30 22:22:54 +00:00
|
|
|
//
|
2005-01-20 23:22:22 +00:00
|
|
|
// This is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation;
|
|
|
|
// either version 2.1 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This software is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// To view the GNU Lesser General Public License visit
|
|
|
|
// http://www.gnu.org/copyleft/lesser.html
|
|
|
|
// or write to the Free Software Foundation, Inc.,
|
|
|
|
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2002-04-30 22:22:54 +00:00
|
|
|
|
|
|
|
// flags determining what is written to standard out.
|
|
|
|
// (errors go to stderr)
|
|
|
|
//
|
|
|
|
// NOTE: all writes to stdout should have an if (log.*) {} around them.
|
|
|
|
//
|
|
|
|
|
2002-10-06 00:45:29 +00:00
|
|
|
#ifndef _LOGFLAGS_H_
|
|
|
|
#define _LOGFLAGS_H_
|
|
|
|
|
2004-03-04 11:41:43 +00:00
|
|
|
#ifndef _WIN32
|
2002-04-30 22:22:54 +00:00
|
|
|
#include <stdio.h>
|
2004-03-04 11:41:43 +00:00
|
|
|
#endif
|
2002-04-30 22:22:54 +00:00
|
|
|
|
2006-05-21 21:11:28 +00:00
|
|
|
struct LOG_FLAGS {
|
2006-06-22 19:40:30 +00:00
|
|
|
// on by default, user-readable
|
2002-04-30 22:22:54 +00:00
|
|
|
//
|
2006-06-22 19:40:30 +00:00
|
|
|
bool task; // task start and finish
|
|
|
|
bool file_xfer; // file transfer start and finish
|
2002-04-30 22:22:54 +00:00
|
|
|
bool sched_ops; // interactions with schedulers
|
|
|
|
|
2006-06-22 19:40:30 +00:00
|
|
|
// off by default; intended for developers and testers
|
2002-04-30 22:22:54 +00:00
|
|
|
//
|
2006-06-22 19:40:30 +00:00
|
|
|
bool cpu_sched; // preemption and resumption
|
|
|
|
bool cpu_sched_debug; // explain scheduler decisions
|
|
|
|
bool rr_simulation; // results of rr simulator
|
|
|
|
bool debt_debug; // changes to debt
|
|
|
|
bool task_debug; // task start and control details
|
2006-06-23 16:36:17 +00:00
|
|
|
// also prints when apps checkpoint
|
2006-06-22 19:40:30 +00:00
|
|
|
bool work_fetch_debug; // work fetch policy
|
|
|
|
|
|
|
|
bool unparsed_xml; // show unparsed XML lines
|
|
|
|
bool state_debug; // print textual summary of CLIENT_STATE initially
|
|
|
|
// and after each scheduler RPC and garbage collect
|
|
|
|
// also show actions of garbage collector
|
|
|
|
// also show when state file is read or written
|
|
|
|
bool file_xfer_debug; // show completion of FILE_XFER
|
2002-04-30 22:22:54 +00:00
|
|
|
bool sched_op_debug;
|
|
|
|
bool http_debug;
|
2004-03-27 00:45:27 +00:00
|
|
|
bool proxy_debug;
|
2002-04-30 22:22:54 +00:00
|
|
|
bool time_debug; // print message on sleep
|
|
|
|
bool net_xfer_debug;
|
2002-08-30 21:32:31 +00:00
|
|
|
bool measurement_debug; // host measurement notices
|
2002-08-28 21:50:51 +00:00
|
|
|
bool poll_debug; // show what polls are responding
|
2004-06-11 20:52:27 +00:00
|
|
|
bool guirpc_debug;
|
2005-05-11 06:57:58 +00:00
|
|
|
bool scrsave_debug;
|
2006-07-20 20:42:26 +00:00
|
|
|
bool app_msg_debug; // show shared-mem message from apps
|
2002-04-30 22:22:54 +00:00
|
|
|
|
|
|
|
LOG_FLAGS();
|
|
|
|
int parse(FILE*);
|
|
|
|
};
|
|
|
|
|
2006-05-21 21:11:28 +00:00
|
|
|
struct CONFIG {
|
2006-05-22 09:54:31 +00:00
|
|
|
bool dont_check_file_sizes;
|
2006-05-21 21:11:28 +00:00
|
|
|
int save_stats_days;
|
2006-06-21 22:08:20 +00:00
|
|
|
int ncpus;
|
2006-05-21 21:11:28 +00:00
|
|
|
CONFIG();
|
|
|
|
int parse(FILE*);
|
2006-07-11 22:52:17 +00:00
|
|
|
int parse_options(FILE*);
|
2006-05-21 21:11:28 +00:00
|
|
|
};
|
|
|
|
|
2002-04-30 22:22:54 +00:00
|
|
|
extern LOG_FLAGS log_flags;
|
2006-05-21 21:11:28 +00:00
|
|
|
extern CONFIG config;
|
|
|
|
extern void read_config_file();
|
2002-10-06 00:45:29 +00:00
|
|
|
|
2002-10-09 18:48:26 +00:00
|
|
|
#endif
|
|
|
|
|