Hi
I want to use Parser for Parsing my own Logfile with diffrent field other than ParsedEntry.
How can I do that ?
I think for that I need my OwnEntity like ParedEntry which can have field which I want
also I need to change
"void addEntry(ParsedEntry)" function which can take my Entity. but that is not possible because it is final..
What steps should I Follow for that
Waiting for your kind response
Thanks,Regards
Praveena Chordia
How to create Parse for own log File
Moderator: admin
Hello,
At this time, I suggest you 3 different solutions, depending on what you need:
Using 3., you will see your fields in the 'Message' column of the entries list.
But this post may match your need:
viewtopic.php?t=40
it talks about a new feature that will be developed in one of our next releases: each ParsedEntry will have an hash table to store any number of user-defnined fields that will be displayed in LogMX, just as other fields, in its own column. Other features like search, filter, alert, export, ... will then be able to 'see' these user-defined fields like it does with fields 'Message', 'Level', 'Thread', etc...
Regards,
Xavier
At this time, I suggest you 3 different solutions, depending on what you need:
- Write your own class "MyEntity" that extends "ParsedEntry". This way, you can set any attribute you want on "MyEntity" and use it the same way you use "ParsedEntry" (i.e. using "void addEntry(ParsedEntry)" with "MyEntity" will be OK)
- Store your own information in "extraInfo" attribute of class "ParsedEntry". If you have many fields, you can store a HashMap, HashTable, List or any collection you want in this "extraInfo" attribute (see Parser-dev API)
- Store your own information in 'message' field of your "ParsedEntry" (appending your fields at the beginning or at the end of the entry message)
Using 3., you will see your fields in the 'Message' column of the entries list.
But this post may match your need:
viewtopic.php?t=40
it talks about a new feature that will be developed in one of our next releases: each ParsedEntry will have an hash table to store any number of user-defnined fields that will be displayed in LogMX, just as other fields, in its own column. Other features like search, filter, alert, export, ... will then be able to 'see' these user-defined fields like it does with fields 'Message', 'Level', 'Thread', etc...
Regards,
Xavier