From: cvs@openprivacy.orgCVS update: talon/src/java/talon/implementations
Date: Thursday January 25, 19101 @ 11:05
Author: burton
CVSWEB Options: -------------------
Main CVSWeb: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi
View this module: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/implementations
-----------------------------------
Update of /usr/local/cvs/public/talon/src/java/talon/implementations
In directory giga:/tmp/cvs-serv7002/src/java/talon/implementations
Modified Files:
SimpleLogger.java
Log Message:
logger and property manager now being used... required for CompositeRCE
*****************************************************************
File: talon/src/java/talon/implementations/SimpleLogger.java
CVSWEB Options: -------------------
CVSWeb: Annotate this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/implementations/SimpleLogger.java?annotate=1.3
CVSWeb: View this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/implementations/SimpleLogger.java?rev=1.3&content-type=text/x-cvsweb-markup
CVSWeb: Diff to previous version: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/implementations/SimpleLogger.java.diff?r1=1.3&r2=1.2
-----------------------------------
Index: talon/src/java/talon/implementations/SimpleLogger.java
diff -u talon/src/java/talon/implementations/SimpleLogger.java:1.2 talon/src/java/talon/implementations/SimpleLogger.java:1.3
--- talon/src/java/talon/implementations/SimpleLogger.java:1.2 Tue Jan 16 08:10:20 2001
+++ talon/src/java/talon/implementations/SimpleLogger.java Thu Jan 25 11:05:17 2001
@@ -30,7 +30,7 @@
* - stderr -> If true, log to stderr
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleLogger.java,v 1.2 2001/01/16 16:10:20 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
*/
public class SimpleLogger extends BaseComponent implements Component, Logger {
@@ -40,6 +40,8 @@
public static final String INIT_PROPERTY_STDERR = "stdout";
public static final String INIT_PROPERTY_STDOUT = "stdout";
+
+ //FIXME: should we throw an Exception if the project is not known???
public static final String INIT_PROPERTY_PROJECT = "project";
/**
@@ -67,13 +69,41 @@
private boolean stderr = false;
private String project = null;
+
+
+ /**
+ * Default constructor when used as a Component
+ *
+ * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
+ * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
+ */
+ public SimpleLogger() { }
+
+ /**
+ * Default constructor when used as an Object
+ *
+ * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
+ * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
+ */
+ public SimpleLogger( ComponentHandle handle,
+ boolean debug,
+ boolean stdout,
+ boolean stderr,
+ String project ) {
+
+ this.setComponentHandle( handle );
+ this.debug = debug;
+ this.stdout = stdout;
+ this.stderr = stderr;
+ this.project = project;
+ }
/**
* Perform any necessary initialization
*
* @see Component
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleLogger.java,v 1.2 2001/01/16 16:10:20 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
*/
public void init() throws TalonException {
@@ -99,7 +129,7 @@
* Log a message
*
* @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
- * @version $Id: SimpleLogger.java,v 1.2 2001/01/16 16:10:20 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
*/
public void message( String message ) {
message( null, message );
@@ -109,7 +139,7 @@
* Log a message
*
* @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
- * @version $Id: SimpleLogger.java,v 1.2 2001/01/16 16:10:20 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
*/
public void message( Object source, String message ) {
logString( source, getLogPrefix() + " -> " + message );
@@ -119,7 +149,7 @@
* Log an error
*
* @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
- * @version $Id: SimpleLogger.java,v 1.2 2001/01/16 16:10:20 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
*/
public void error( String message ) {
error( null, message );
@@ -129,7 +159,7 @@
* Log an error
*
* @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
- * @version $Id: SimpleLogger.java,v 1.2 2001/01/16 16:10:20 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
*/
public void error( Object source, String message ) {
logString( source, getLogPrefix() + " -> ERROR: " + message );
@@ -140,7 +170,7 @@
* Log a warning
*
* @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
- * @version $Id: SimpleLogger.java,v 1.2 2001/01/16 16:10:20 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
*/
public void warning( String message ) {
warning( null, message );
@@ -150,7 +180,7 @@
* Log a warning
*
* @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
- * @version $Id: SimpleLogger.java,v 1.2 2001/01/16 16:10:20 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
*/
public void warning( Object source, String message ) {
logString( source, getLogPrefix() + " -> WARNING: " + message );
@@ -160,7 +190,7 @@
* Log a debug message
*
* @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
- * @version $Id: SimpleLogger.java,v 1.2 2001/01/16 16:10:20 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
*/
public void debug( String message ) {
debug( null, message );
@@ -170,7 +200,7 @@
* Log a debug message
*
* @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
- * @version $Id: SimpleLogger.java,v 1.2 2001/01/16 16:10:20 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
*/
public void debug( Object source, String message ) {
@@ -183,7 +213,7 @@
/**
* @see #logString
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleLogger.java,v 1.2 2001/01/16 16:10:20 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
*/
private void logString( String s ) {
logString( null, s);
@@ -194,7 +224,7 @@
*
* @param source Object source where this was logged from
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleLogger.java,v 1.2 2001/01/16 16:10:20 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
*/
private void logString( Object source, String s ) {
@@ -247,7 +277,7 @@
* Get the prefix for log output.
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleLogger.java,v 1.2 2001/01/16 16:10:20 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
*/
private String getLogPrefix() {
return this.project + " [" + this.getDate() + "]";
@@ -259,7 +289,7 @@
* Determine if it is OK to log to disk
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleLogger.java,v 1.2 2001/01/16 16:10:20 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
*/
private boolean isFileEnabled() {
@@ -302,7 +332,7 @@
* Get the date/time in a nice format for logging.
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleLogger.java,v 1.2 2001/01/16 16:10:20 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
*/
private String getDate() {
This archive was generated by hypermail 2b30 : Thu Jan 25 2001 - 11:06:19 PST