-
Notifications
You must be signed in to change notification settings - Fork 86
ImplementLogImporter
Sven Nissel edited this page Apr 8, 2022
·
2 revisions
OtrosLogViewer can load custom LogImporter.
LogImporter takes InputStream as a source of log events. Parsed log events have to added to LogDataCollector. ParsingContext can be used to store data and objects like date formatter. LogImporter is not thread safe, it can be invoked by many thread at the same time.
To implement LogImporter you have to:
- Implement LogImporter interface
- Put your jar into $OLV/plugins/logimporters or $HOME/.otroslogviewer/plugins/logimporters
- Your implementation will be detected and loaded during application start
LogImporter interface
public interface LogImporter extends PluginableElement {
public static final int LOG_IMPORTER_VERSION_1 = 1;
public final String PARSER_CLASS = "parser.class";
public final String PARSER_DISPLAYABLE_NAME = "parser.displayableName"; public final String PARSER_MNEMONIC = "parser.mnemonic"; public final String PARSER_KEY_STROKE_ACCELELATOR = "parser.keyStrokeAccelelator"; public final String PARSER_ICON = "parser.icon";
public void init(Properties properties) throws InitializationException;
/** * Initialize parsing context specific resources, which are not thread safe (i.e. DateFormat)
* * @param parsingContext
*/
public void initParsingContext(ParsingContext parsingContext);
public void importLogs(InputStream in, LogDataCollector dataCollector, ParsingContext parsingContext);
public String getKeyStrokeAccelelator();
public int getMnemonic();
public Icon getIcon();
}
<TABLE width="100%">
<TR>
<TD>
<-- Implementing custom filters
</TD>
<TD align="right">
Implementing custom message formatter -->
</TD>
</TR>
</TABLE>
- Introduction
- Installation
- Opening logs
- Log parsers
- Searching for events
- Marking events
- Notes
- Filters
- Log events message detail formatters and colorizers
- Jump to code - Integration with IDE
- Saving and loading log investigation
- HotKeys
- Batch processing
- DevelopingPlugins
- Developing on OtrosLogViewer
- Experimental features
- Limitations
- Video
- Used by
- DonateAndDonors