|
[ source navigation ] [ diff markup ] [ identifier search ] [ general search ] |
|||||
|
||||||
001 /************************************************************************* 002 * 003 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 004 * 005 * Copyright 2008 by Sun Microsystems, Inc. 006 * 007 * OpenOffice.org - a multi-platform office productivity suite 008 * 009 * $RCSfile: LogManager.java,v $ 010 * $Revision: 1.3 $ 011 * 012 * This file is part of OpenOffice.org. 013 * 014 * OpenOffice.org is free software: you can redistribute it and/or modify 015 * it under the terms of the GNU Lesser General Public License version 3 016 * only, as published by the Free Software Foundation. 017 * 018 * OpenOffice.org is distributed in the hope that it will be useful, 019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 021 * GNU Lesser General Public License version 3 for more details 022 * (a copy is included in the LICENSE file that accompanied this code). 023 * 024 * You should have received a copy of the GNU Lesser General Public License 025 * version 3 along with OpenOffice.org. If not, see 026 * <http://www.openoffice.org/license.html> 027 * for a copy of the LGPLv3 License. 028 * 029 ************************************************************************/ 030 031 package org.openoffice.setup.Util; 032 033 import java.util.Vector; 034 035 public class LogManager { 036 037 static private Vector logfile; /* collects all logging information during installation */ 038 static private Vector commandsLogFile; /* collects all system commands information during installation */ 039 static private Vector saveLogFile; /* contains the content of the saved log file */ 040 static private Vector modulesLogFile; 041 042 private LogManager() { 043 } 044 045 static public Vector getSaveLogfile() { 046 return saveLogFile; 047 } 048 049 static public void addLogfileComment(String text) { 050 logfile.add(text); 051 } 052 053 static public void addCommandsLogfileComment(String text) { 054 commandsLogFile.add(text); 055 } 056 057 static public void addModulesLogfileComment(String text) { 058 modulesLogFile.add(text); 059 } 060 061 static public void setCommandsHeaderLine(String text) { 062 String line = "*************************************"; 063 commandsLogFile.add(""); 064 commandsLogFile.add(line); 065 commandsLogFile.add("<b>" + text + "</b>"); 066 commandsLogFile.add(line); 067 commandsLogFile.add(""); 068 } 069 070 static public void setModulesLogFileHeaderLine(String text) { 071 String line = "*************************************"; 072 modulesLogFile.add(line); 073 modulesLogFile.add(text); 074 modulesLogFile.add(line); 075 } 076 077 static public String publishLogfileContent(String text, String separatorline) { 078 for (int i = 0; i < logfile.size(); i++) { 079 text = text + logfile.get(i) + "<br>"; 080 } 081 082 if ( ! logfile.isEmpty() ) { 083 text = text + separatorline + "<br>"; 084 } 085 086 return text; 087 } 088 089 static public String publishCommandsLogfileContent(String text) { 090 for (int i = 0; i < commandsLogFile.size(); i++) { 091 text = text + commandsLogFile.get(i) + "<br>"; 092 } 093 094 return text; 095 } 096 097 static public Vector getModulesLogFile() { 098 return modulesLogFile; 099 } 100 101 static { 102 logfile = new Vector(); 103 commandsLogFile = new Vector(); 104 saveLogFile = new Vector(); 105 modulesLogFile = new Vector(); 106 } 107 108 }
| [ source navigation ] | [ diff markup ] | [ identifier search ] | [ general search ] |
| This page was automatically generated by the LXR engine. The LXR team |
|