zarunbal / LogExpert

Windows tail program and log file analyzer.
Other
945 stars 162 forks source link

[feature] Logexpert's user exit to call script code #172

Open TekBear opened 4 years ago

TekBear commented 4 years ago

How about extending/enhancing Logexpert's plugin capability by adding a user exit (aka wrapper) plugin that calls a user defined script (for example a VBScript) when each real time log data line arrives and before logexpert begins columnizer, highlight and trigger processing phase. The script is passed the log data line as input and returns a transformed data line or an empty line if script needs to do conditional filtering. I can then write the user defined VBScript code part to fix logs that do not follow strict column rules.

USE CASE: In particular, I need to do that for Folding@home client log which is an inconsistent format. I need to code:

This is a real time log, so pre-processing the logs before using logexpert would make this a more complex and ugly solution rather than have a general purpose user exit in logexpert that triggers on new log line data.

Examples of API hooks/user exits/plugins found in other software:

It would be nice if wrapper was generic enough to support other script languages e.g. LUA, Python, or Perl. I could learn to write the back end code in another language if I have too. Logexpert performance is only going to be impacted if you need to use user defined scripts. I will help with testing phase if needed.

Hirogen commented 4 years ago
  • Bginfo.exe (Microsoft Sysinternals) has hooks for using user defined VBScript (full VB function list, and subset of other features)
  • Videolan (VLC) has hooks for calling LUA scripts.

Those Hooks are a big change request, not sure if this will be supported anytime soon.

I know it sounds nice to "just have a wrapper" for another language, but the implications on the software are huge, this needs to be considered very carefully and implementation is not as easy as plug and play, it's more like bug and pray!

there is http://nlua.org/ but I'm not sure it's worth the implementation.