File |
Line |
net/sf/logdistiller/logtypes/JBossLogEvent.java |
89 |
net/sf/logdistiller/logtypes/Log4jXmlLogEvent.java |
142 |
}
private static class Description
extends LogType.Description
{
public Description( LogType.Basic logtype, String[] attributeNames )
{
super( logtype, attributeNames );
logtype.setDescription( this );
}
public LogEvent.Factory newFactory( Reader reader, String logSource )
throws IOException
{
return new Factory( this, reader, logSource );
}
public String getDefaultSpecificGroups()
{
return " <group id=\"warn\">\n"
+ " <description>WARN events</description>\n"
+ " <condition>\n"
+ " <match attribute=\"level\" type=\"equals\">WARN</match>\n"
+ " </condition>\n"
+ " <report publisher=\"file\"/>\n"
+ " <plugin type=\"sampling\">\n"
+ " <param name=\"attributes\">logger</param>\n"
+ " </plugin>\n"
+ " </group>\n"
+ "\n"
+ " <group id=\"error\">\n"
+ " <description>ERROR events</description>\n"
+ " <condition>\n"
+ " <match attribute=\"level\" type=\"equals\">ERROR</match>\n"
+ " </condition>\n"
+ " <report publisher=\"file\"/>\n"
+ " <plugin type=\"sampling\">\n"
+ " <param name=\"attributes\">logger</param>\n"
+ " </plugin>\n"
+ " </group>";
}
public String getDefaultSamplingAttributes()
{
return "level,logger";
}
}
private static class Factory
extends LogEvent.Factory
{
private final LineNumberReader reader;
private String curLine;
public Factory( Description description, Reader reader, String logSource )
throws FileNotFoundException
{
super( description, logSource );
this.reader = new LineNumberReader( reader );
} |
File |
Line |
net/sf/logdistiller/publishers/FeedPublisher.java |
77 |
net/sf/logdistiller/publishers/MailPublisher.java |
69 |
}
public void publish( LogDistillation.Group group, LogDistiller.Report report )
throws IOException, PublishException
{
// prepare the data for the entry
LogDistillation logdistillation = group.getLogdistillation();
String content = logdistillation.getContent();
String subject =
"[logdistiller:" + logdistillation.getDefinition().getOutput().getId() + "]"
+ ( ( content == null ) ? "" : ( " " + content ) ) + " report for group "
+ group.getDefinition().getId() + ": " + group.getEventCount() + " logevents";
ReportFormat format = ReportFormats.getReportFormat( report.getFormat() );
StringWriter sw = new StringWriter();
format.report( group, sw );
String body = sw.toString(); |