1 package org.apache.turbine.services.logging;
2
3 /* ====================================================================
4 * The Apache Software License, Version 1.1
5 *
6 * Copyright (c) 2001 The Apache Software Foundation. All rights
7 * reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 *
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 *
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in
18 * the documentation and/or other materials provided with the
19 * distribution.
20 *
21 * 3. The end-user documentation included with the redistribution,
22 * if any, must include the following acknowledgment:
23 * "This product includes software developed by the
24 * Apache Software Foundation (http://www.apache.org/)."
25 * Alternately, this acknowledgment may appear in the software itself,
26 * if and wherever such third-party acknowledgments normally appear.
27 *
28 * 4. The names "Apache" and "Apache Software Foundation" and
29 * "Apache Turbine" must not be used to endorse or promote products
30 * derived from this software without prior written permission. For
31 * written permission, please contact apache@apache.org.
32 *
33 * 5. Products derived from this software may not be called "Apache",
34 * "Apache Turbine", nor may "Apache" appear in their name, without
35 * prior written permission of the Apache Software Foundation.
36 *
37 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
38 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
39 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
40 * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
41 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
42 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
43 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
44 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
45 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
46 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
47 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
48 * SUCH DAMAGE.
49 * ====================================================================
50 *
51 * This software consists of voluntary contributions made by many
52 * individuals on behalf of the Apache Software Foundation. For more
53 * information on the Apache Software Foundation, please see
54 * <http://www.apache.org/>.
55 */
56
57 import java.util.Vector;
58 import java.util.Properties;
59 import org.apache.turbine.services.InitializationException;
60
61 /***
62 * This is the interface that one must implement if they wish to
63 * provide alternative configuration resources for the Logging
64 * system.
65 *
66 * @author <a href="mailto:jon@latchkey.com">Jon S. Stevens</a>
67 * @version $Id: LoggingConfig.java,v 1.2 2002/04/05 07:04:55 dobbs Exp $
68 */
69 public interface LoggingConfig
70 {
71 public final static String LOGGINGCONFIG = "loggingConfig";
72 public final static String DEFAULT = "default";
73 public final static String FACILITIES = "facilities";
74 public final static String DESTINATION = "destination";
75 public final static String CLASSNAME = "className";
76 public final static String LEVEL = "level";
77
78 /*** default rollover file size */
79 public static final long DEFAULT_FILE_SIZE = 80000;
80
81 /*** default number of backup files */
82 public static final int DEFAULT_BACKUP_FILES = 1;
83
84 public abstract void setInitResource(Object props);
85
86 /***
87 * returns all properties in a properties object - used by log4j
88 * initialization
89 **/
90 public abstract Properties getFacilityProperties(String facilityName);
91
92 public abstract void init() throws InitializationException;
93
94 public abstract Object getServletContext();
95
96 public abstract void setServletContext(Object value);
97
98 public abstract String getFormat();
99
100 public abstract void setFormat(String value);
101
102 public abstract String getName();
103
104 public abstract void setName(String value);
105
106 public abstract String getRemoteHost();
107
108 public abstract void setRemoteHost(String value);
109
110 public abstract int getRemotePort();
111
112 public abstract void setRemotePort(int value);
113
114 public abstract int getBackupFiles();
115
116 public abstract void setBackupFiles(int value);
117
118 public abstract long getFileSize();
119
120 public abstract void setFileSize(long value);
121
122 public abstract Vector getFiles();
123
124 public abstract void setFiles(Vector value);
125
126 public abstract boolean getConsole();
127
128 public abstract void setConsole(boolean value);
129
130 public abstract String getSyslogHost();
131
132 public abstract void setSyslogHost(String syslogHost);
133
134 public abstract String getSyslogFacility();
135
136 public abstract void setSyslogFacility(String syslogFacility);
137
138 public abstract String getEmailFrom();
139
140 public abstract void setEmailFrom(String emailFrom);
141
142 public abstract String getEmailTo();
143
144 public abstract void setEmailTo(String emailTo);
145
146 public abstract String getEmailSubject();
147
148 public abstract void setEmailSubject(String emailSubject);
149
150 public abstract void setDbLogger(String v);
151 public abstract String getDbLogger();
152
153 public abstract void setDbPool(String v);
154 public abstract String getDbPool();
155
156 public abstract String getEmailBufferSize();
157
158 public abstract void setEmailBufferSize(String emailBufferSize);
159
160 public abstract void setClassName(String className);
161
162 public abstract String getClassName();
163
164 public abstract String getLevel();
165
166 public abstract void setLevel(String level);
167 }
This page was automatically generated by Maven