/**
* Create a LogFactor record from a LogKit event
*/
public LogKitLogRecord( final LogEvent event, final Formatter fmt )
{
final ContextMap contextMap = event.getContextMap();
Object contextObject;
// Category
setCategory( event.getCategory() );
// Level
setLevel( toLogLevel( event.getPriority() ) );
m_severe = event.getPriority().isGreater( Priority.INFO );
// Location
if( null != contextMap && null != ( contextObject = contextMap.get( "method" ) ) )
{
setLocation( contextObject.toString() );
}
else
{
setLocation( StackIntrospector.getCallerMethod( Logger.class ) );
}
// Message
setMessage( event.getMessage() );
// Millis
setMillis( event.getTime() );
// NDC
setNDC( fmt.format( event ) );
// SequenceNumber
//setSequenceNumber( 0L );
// ThreadDescription
if( null != contextMap && null != ( contextObject = contextMap.get( "thread" ) ) )
{
setThreadDescription( contextObject.toString() );
}
else
{