| career | drupal | java | mac | mysql | perl | scala | uml | unix  
<td width="100%" nowrap> <a class="nav" href="<%=indexUrl%>"> »  <a class="nav" href="index">Admin CP »  Log File Management </td> </tr> </table> <br/> <table class="tborder" width="95%" cellspacing="1" cellpadding="3" align="center"> <tr class="pagedesc"> <td> <b>Log File Management is a place that you can manage your log files. You should config the log file first. If you choose <a href="">Log4j, then config file Or if you choose <a href="">Jlo, please config file jlo_logging.xml. Please note that Log4j is more common and should be used, however, sometime Log4j could not work on JRun 4 or Tomcat 5, Tomcat 5.5, then you should use Jlo as an alternative logging solution.<br/> After that, you have to config mvnforum.xml to let mvnForum know your current log file. Please note that the log file must be in folder mvnForumHome/log to let mvnForum work properly.<br/> With this log management tool, you can view content of the current log file (show all or with filer). You can backup the log file to the log directory. Usually, when backup the log file, you should empty it to reduce the log file size. You can list all archieved log files, download them or delete them if you want. <br/> Choose below tasks to continue:<br/> <a href="listlogfiles" class='command'>List log files (you can also download or delete archieved log files)
<a href="backupsystemlog" class='command'>Backup the system log (take a few minutes. Depend on the system log size)
<a href="backupsystemlog?empty=yes" class='command'>Backup the system log then empty the file (take a few minutes. Depend on the system log size) </td> </tr> </table> <br/> <form action="viewlogsystem" name="submitform"> <input type="hidden" name="filename" value="<%=fileName%>"> <table class="tborder" width="95%" cellspacing="1" cellpadding="3" align="center"> <tr class="theader"> <td colspan="2">Log file Information: </tr> <tr class="trow1"> <td>File directory: <td class="messageText"><%=logDir%> </tr> <tr class="trow2"> <td>File log name: <td class="messageText"><%=logFileName%> </tr> <tr class="trow1"> <td>File log size: <td class="messageText"><%=logFileHumanSize%> (<%=logFileSize%> bytes) </tr> <tr class="trow2"> <td>How many lines do you want to view? <td> <select name="linecount" onChange="document.submitform.submit();"> <% for ( int i = 0 ; i < lineNums.length; i ++ ) {%> <option value='<%=lineNums[i]%>' <%if ( lineNums[i] == lineCount ) {%> selected <%}%> ><%=lineNums[i]%> <%}%> </select> Before filter <select name="log" onChange="document.submitform.submit();"> <% for ( int i = 0 ; i < logs.length ; i ++ ) {%> <option <%if ( log.equals(logs[i]) ) {%> selected <%}%> value='<%=logs[i]%>'/><%=logValues[i]%>
<%}%> </select> </td> </tr> </table> </form> <br/> <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center"> <tr class="theader"> <td>Line <td width="100%" align="center">Content </tr> <tr> <td colspan="2"> <iframe src='logframe?filename=<%=fileName%>&linecount=<%=lineCount%>&log=<%=log%>' align='center' frameborder="0" height="400" width="100%" marginheight="0" marginwidth="0" scrolling="auto"></iframe> </td> </tr> </table> <br/> <br/> </fmt:bundle> <%@ include file="footer.jsp"%> </body> </html>

What this is

This file is included in the "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

 - $Header: /cvsroot/mvnforum/mvnforum/srcweb/mvnplugin/mvnforum/admin/viewlogsystem.jsp,v 1.12 2005/01/18 11:01:39 minhnn Exp $
 - $Author: minhnn $
 - $Revision: 1.12 $
 - $Date: 2005/01/18 11:01:39 $
 - ====================================================================
 - Copyright (C) 2002-2005 by
 - 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 any later version.
 - All copyright notices regarding mvnForum MUST remain intact
 - in the scripts and in the outputted HTML.
 - The "powered by" text/logo with a link back to
 - and in the
 - footer of the pages MUST remain visible when the pages
 - are viewed on the internet or intranet.
 - This program is distributed in the hope that it will be useful,
 - but WITHOUT ANY WARRANTY; without even the implied warranty of
 - GNU General Public License for more details.
 - You should have received a copy of the GNU General Public License
 - along with this program; if not, write to the Free Software
 - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 - Support can be obtained from support forums at:
 - Correspondence and Marketing Questions can be sent to:
 - @author: Minh Nguyen
 - @author: Mai  Nguyen
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page errorPage="fatalerror.jsp"%>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="net.myvietnam.mvncore.util.*" %>
<%@ page import="com.mvnforum.db.*" %>
<%@ page import="com.mvnforum.MVNForumConstant" %>
<%@ page import="com.mvnforum.MVNForumConfig" %>
<%@ taglib uri="" prefix="pg" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ include file="inc_common.jsp"%>
<fmt:bundle basename="mvnForum_i18n">
  <title> - Log File Management
<%@ include file="/mvnplugin/mvnforum/meta.jsp"%>
<link href="<%=onlineUser.getCssPath()%>" rel="stylesheet" type="text/css">
<body leftmargin="0" topmargin="0">
<%@ include file="inc_js_checkvalid_myvietnamlib.jsp"%>
<%@ include file="header.jsp"%>
String logs[]      = {"ALL", "TRACE",      "DEBUG",      "INFO",      "WARN" ,     "ERROR",      "FATAL"};
String logValues[] = {"All", "Only Trace", "Only Debug", "Only Info", "Only Warn", "Only Error", "Only Fatal"};
int lineNums[]     = { 25, 50 , 100, 200, 400, 800 };

int lineCount = ParamUtil.getParameterInt(request, "linecount", 25);
String log = ParamUtil.getParameter(request, "log");
if (log.length() == 0 ) {
  log = "ALL";
String logDir = ParamUtil.getAttribute(request, "LogDir");
String logFileName = ParamUtil.getAttribute(request, "LogFileName");
String logFileSize = ParamUtil.getAttribute(request, "LogFileSize");
String logFileHumanSize = ParamUtil.getAttribute(request, "LogFileHumanSize");
String fileName = ParamUtil.getAttribute(request, "FileName");

<table width="95%" align="center">
  <tr class="nav">
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller


new blog posts


Copyright 1998-2021 Alvin Alexander,
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.