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.admin;
07:
08: import com.sun.portal.search.rdm.*;
09: import com.sun.portal.search.rdmserver.*;
10: import com.sun.portal.search.util.*;
11:
12: import java.io.*;
13: import java.util.*;
14:
15: /**
16: * CLI specific RDM container functions
17: */
18: public class RDSearchContext extends RDMContext {
19:
20: PrintWriter logWriter;
21:
22: /** Creates new RDSearchContext */
23: public RDSearchContext(String serverroot) throws Exception {
24: super (new com.sun.portal.search.rdmserver.RDMConfig(serverroot));
25: logWriter = new PrintWriter(new OutputStreamWriter(System.out));
26: }
27:
28: public void log(String msg) {
29: logWriter.println(msg);
30: }
31:
32: synchronized public void log(String msg, Exception e) {
33: logWriter.println(msg);
34: e.printStackTrace(logWriter);
35: }
36:
37: }
|