1 /******************************************************************************* 2 * This file is part of BOINC. 3 * http://boinc.berkeley.edu 4 * Copyright (C) 2012 University of California 5 * 6 * BOINC is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU Lesser General Public License 8 * as published by the Free Software Foundation, 9 * either version 3 of the License, or (at your option) any later version. 10 * 11 * BOINC is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 * See the GNU Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public License 17 * along with BOINC. If not, see <http://www.gnu.org/licenses/>. 18 ******************************************************************************/ 19 package edu.berkeley.boinc.utils; 20 21 public class Logging { 22 static public String TAG = "BOINC_GUI"; 23 24 static public int LOGLEVEL = -1; 25 static public Boolean ERROR = LOGLEVEL > 0; 26 static public Boolean WARNING = LOGLEVEL > 1; 27 static public Boolean INFO = LOGLEVEL > 2; 28 static public Boolean DEBUG = LOGLEVEL > 3; 29 static public Boolean VERBOSE = LOGLEVEL > 4; 30 31 static public Boolean RPC_PERFORMANCE = false; 32 static public Boolean RPC_DATA = false; 33 setLogLevel(Integer logLevel)34 static public void setLogLevel(Integer logLevel) { 35 LOGLEVEL = logLevel; 36 ERROR = LOGLEVEL > 0; 37 WARNING = LOGLEVEL > 1; 38 INFO = LOGLEVEL > 2; 39 DEBUG = LOGLEVEL > 3; 40 VERBOSE = LOGLEVEL > 4; 41 } 42 } 43