Last change
on this file since 21922 was 21922, checked in by sjm84, 14 years ago |
Added an additional file and modified an existing file for the GAI extension manager
|
File size:
573 bytes
|
Line | |
---|
1 | package org.greenstone.admin;
|
---|
2 |
|
---|
3 | import java.io.File;
|
---|
4 |
|
---|
5 | import javax.swing.JTextArea;
|
---|
6 |
|
---|
7 | import org.apache.log4j.Logger;
|
---|
8 | import org.apache.log4j.PropertyConfigurator;
|
---|
9 |
|
---|
10 | public class LoggedMessageArea extends JTextArea
|
---|
11 | {
|
---|
12 | Logger _logger = null;
|
---|
13 | boolean _loggingLoaded = false;
|
---|
14 |
|
---|
15 | public LoggedMessageArea(Class loggerClass)
|
---|
16 | {
|
---|
17 | if(!_loggingLoaded){
|
---|
18 | PropertyConfigurator.configure("log4j.properties");
|
---|
19 | _loggingLoaded = true;
|
---|
20 | }
|
---|
21 | _logger = Logger.getLogger(loggerClass);
|
---|
22 | }
|
---|
23 |
|
---|
24 | public void append(String s)
|
---|
25 | {
|
---|
26 | super.append(s);
|
---|
27 | _logger.info(s);
|
---|
28 | }
|
---|
29 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.