01: /*
02: * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05:
06: package com.sun.portal.search.rdmserver;
07:
08: import com.sun.portal.search.rdm.*;
09: import com.sun.portal.search.util.*;
10:
11: import java.io.*;
12: import java.util.*;
13:
14: /**
15: * CLI specific RDM container functions
16: */
17: public class TestRDMContext extends RDMContext {
18:
19: PrintWriter logWriter;
20:
21: /** Creates new TestRDMContext */
22: public TestRDMContext(String serverroot) throws Exception {
23: super (new RDMConfig(serverroot));
24: logWriter = new PrintWriter(new OutputStreamWriter(System.out));
25: }
26:
27: public void log(String msg) {
28: logWriter.println(msg);
29: }
30:
31: synchronized public void log(String msg, Exception e) {
32: logWriter.println(msg);
33: e.printStackTrace(logWriter);
34: }
35:
36: }
|