Copyright 2009,2010, Lapetus Systems Ltd. (All rights reserved)

com.lapetus_ltd.api.common.logger
Interface ILptsLogListener

All Known Implementing Classes:
TLptsLogOutputListener, TLptsViewLogPanel

public interface ILptsLogListener

Class Description : The listener interface for the LOGGER.

Implement this interface if you wish to get to get a copy of the new logs generated in the system.

$LastChangedRevision: 599 $
$LastChangedDate:: 2010-05-27 11:56:12 $


Method Summary
 void newLogGenerated(TLptsLog log)
           Used to inform a listener that a new TLptsLog has been generated.
 

Method Detail

newLogGenerated

void newLogGenerated(TLptsLog log)

Used to inform a listener that a new TLptsLog has been generated.

Notes :

Example :


 public class MyApp implements ILptsLogListener
 {
    public MyApp()
    {
      TLptsLogger.addListener(this);
    }

    public void  newLogGenerated(TLptsLog log)
    {
       if (log.getType().equals(TLptsLogger.LOG_TYPE.ERROR))
         System.out.println("LOG ERROR :" + log.getMessage() + " : Exception : " + log.getExceptionMessage());
       if (log.getType().equals(TLptsLogger.LOG_TYPE.WARNING))
         System.out.println("LOG WARNING :" + log.getMessage() + " : Exception : " + log.getExceptionMessage());
       if (log.getType().equals(TLptsLogger.LOG_TYPE.MESSAGE))
         System.out.println("LOG MESSAGE :" + log.getMessage() + " : Exception : " + log.getExceptionMessage());
    }
 }

 

Parameters:
log - the TLptsLog Generated


Copyright 2009,2010, Lapetus Systems Ltd. (All rights reserved)