KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > log4j > lf5 > StartLogFactor5


1 /*
2  * Copyright 1999-2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.log4j.lf5;
17
18 import org.apache.log4j.lf5.viewer.LogBrokerMonitor;
19
20 /**
21  * Starts an instance of the LogFactor5 console for off-line viewing.
22  *
23  * @author Brad Marlborough
24  * @author Richard Hurst
25  */

26
27 // Contributed by ThoughtWorks Inc.
28

29 public class StartLogFactor5 {
30   //--------------------------------------------------------------------------
31
// Constants:
32
//--------------------------------------------------------------------------
33

34   //--------------------------------------------------------------------------
35
// Protected Variables:
36
//--------------------------------------------------------------------------
37

38   //--------------------------------------------------------------------------
39
// Private Variables:
40
//--------------------------------------------------------------------------
41

42   //--------------------------------------------------------------------------
43
// Constructors:
44
//--------------------------------------------------------------------------
45

46   //--------------------------------------------------------------------------
47
// Public Methods:
48
//--------------------------------------------------------------------------
49

50   /**
51    * Main - starts a an instance of the LogFactor5 console and configures
52    * the console settings.
53    */

54   public final static void main(String JavaDoc[] args) {
55
56     LogBrokerMonitor monitor = new LogBrokerMonitor(
57         LogLevel.getLog4JLevels());
58
59     monitor.setFrameSize(LF5Appender.getDefaultMonitorWidth(),
60         LF5Appender.getDefaultMonitorHeight());
61     monitor.setFontSize(12);
62     monitor.show();
63
64   }
65
66   //--------------------------------------------------------------------------
67
// Protected Methods:
68
//--------------------------------------------------------------------------
69

70   //--------------------------------------------------------------------------
71
// Private Methods:
72
//--------------------------------------------------------------------------
73

74   //--------------------------------------------------------------------------
75
// Nested Top-Level Classes or Interfaces
76
//--------------------------------------------------------------------------
77

78 }
79
80
81
Popular Tags