Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *      http://www.apache.org/licenses/LICENSE-2.0
   *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
 package org.osgi.service.log;
 
Provides methods to access the information contained in an individual Log Service log entry.

A LogEntry object may be acquired from the LogReaderService.getLog method or by registering a LogListener object.

Author(s):
$Id: 1a6c322e64ee1470fb1b2d6b57b610b4df962089 $
See also:
LogReaderService.getLog()
LogListener
ThreadSafe:
Noimplement:
 
 public interface LogEntry {
Returns the bundle that created this LogEntry object.

Returns:
The bundle that created this LogEntry object; null if no bundle is associated with this LogEntry object.
 
 	public Bundle getBundle();

Returns the ServiceReference object for the service associated with this LogEntry object.

Returns:
ServiceReference object for the service associated with this LogEntry object; null if no ServiceReference object was provided.
 
Returns the severity level of this LogEntry object.

This is one of the severity levels defined by the LogService interface.

Returns:
Severity level of this LogEntry object.
See also:
LogService.LOG_ERROR
LogService.LOG_WARNING
LogService.LOG_INFO
LogService.LOG_DEBUG
 
 	public int getLevel();

Returns the human readable message associated with this LogEntry object.

Returns:
String containing the message associated with this LogEntry object.
 
 	public String getMessage();

Returns the exception object associated with this LogEntry object.

In some implementations, the returned exception may not be the original exception. To avoid references to a bundle defined exception class, thus preventing an uninstalled bundle from being garbage collected, the Log Service may return an exception object of an implementation defined Throwable subclass. The returned object will attempt to provide as much information as possible from the original exception object such as the message and stack trace.

Returns:
Throwable object of the exception associated with this LogEntry;null if no exception is associated with this LogEntry object.
 
 	public Throwable getException();

Returns the value of currentTimeMillis() at the time this LogEntry object was created.

Returns:
The system time in milliseconds when this LogEntry object was created.
See also:
"System.currentTimeMillis()"
	public long getTime();
New to GrepCode? Check out our FAQ X