Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH . All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: s IT Solutions AT Spardat GmbH - initial API and implementation /
 
 
 /*
  * Created on : 25.06.2003
  * Created by : s3595
  */
 package at.spardat.xma.boot.logger;

LogRecord

Author(s):
s3595 Chr. Schaefer (CGS)
Version:
$Id: LogRecord.java 2084 2007-11-27 14:53:31Z s3460 $
 
 public class LogRecord implements java.io.Serializable {

    

Serial:
Logging message level
 
     private LogLevel level;

    

Serial:
Class that issued logging call
 
     private String sourceClassName;

    

Serial:
Method that issued logging call
 
     private String sourceMethodName;

    

Serial:
Non-localized raw message text
 
     private String message;

    

Serial:
Event time in milliseconds since 1970
 
     private long millis;

    

Serial:
The Throwable (if any) associated with log message
 
     private Throwable thrown;

    

Serial:
Name of the source Logger.
 
     private String loggerName;
 
     private transient Object parameters[];


    
Get the parameters to the log message.

Returns:
the log message parameters. May be null if there are no parameters.
 
     public Object[] getParameters() {
     return ;
     }

    
Set the parameters to the log message.

Parameters:
parameters the log message parameters.
 
     public void setParameters(Object parameters[]) {
     this. = parameters;
     }



    
Construct a LogRecord with the given level and message values.

The sequence property will be initialized with a new unique value. These sequence values are allocated in increasing order within a VM.

The millis property will be initialized to the current time.

The thread ID property will be initialized with a unique ID for the current thread.

All other properties will be initialized to "null".

Parameters:
level a logging level value
msg the raw non-localized logging message
    public LogRecord(LogLevel levelString msg) {
        this. = level;
         = msg;
         = System.currentTimeMillis();
    }

    
Get the source Logger name's

Returns:
source logger name (may be null)
    public String getLoggerName() {
    return ;
    }
    public String getLevelName() {
        return .getName();
    }

    
Set the source Logger name.

Parameters:
name the source logger name (may be null)
    public void setLoggerName(String name) {
     = name;
    }

    
Get the logging message level, for example Level.SEVERE.

Returns:
the logging message level
    public LogLevel getLevel() {
    return ;
    }

    
Set the logging message level, for example Level.SEVERE.

Parameters:
level the logging message level
    public void setLevel(LogLevel level) {
    if (level == null) {
        throw new NullPointerException();
    }
    this. = level;
    }
    public String getSourceClassName() {
        return ;
    }

    
Set the name of the class that (allegedly) issued the logging request.

Parameters:
sourceClassName the source class name
    public void setSourceClassName(String sourceClassName) {
        this. = sourceClassName;
    }
    public String getSourceMethodName() {
        return ;
    }
    public void setSourceMethodName(String sourceMethodName) {
        this. = sourceMethodName;
    }
    public String getMessage() {
    return ;
    }

    
Set the "raw" log message, before localization or formatting.

Parameters:
message the raw message string
    public void setMessage(String message) {
    this. = message;
    }

    
Get event time in milliseconds since 1970.

Returns:
event time in millis since 1970
    public long getMillis() {
        return ;
    }

    
Set event time.

Parameters:
millis event time in millis since 1970
    public void setMillis(long millis) {
        this. = millis;
    }

    
Get any throwable associated with the log record.

If the event involved an exception, this will be the exception object. Otherwise null.

Returns:
a throwable
    public Throwable getThrown() {
        return ;
    }

    
Set a throwable associated with the log event.

Parameters:
thrown a throwable
    public void setThrown(Throwable thrown) {
    this. = thrown;
    }
New to GrepCode? Check out our FAQ X