External tools

LogExpert

External tools

You can configure 3 external tools which can be launched from LogExpert. LogExpert can add some command line arguments (file name, line number etc.). The output of a tool (stdout) can be piped to a new tab window in LogExpert.

Setting up the tools

Choose "Settings..." from the options menu and click on the "External Tools" tab in the setting dialog. Or choose "Configure..." from the tools menu.

Here you can configure as many tools as you like. All the tools will appear in the Tools menu. Checked entries will also be available in the tool bar.

Name

The name that will used in the Tools menu and for tool bar tooltips.

Program

Enter the path to the executable to be lauched here or click the button on the right for opening a file chooser dialog.

Arguments

Here you can type in the arguments for the command line of the lauched executable. You can use the following variables which will be replaced by its values when launching the tool:

 %L

Current line number. This is the number of the currently selected line in the log window.

 %N

Name of log file without path

 %P

Directory of log file

 %F

Full file name (incl. path) of the log file

 %E

File name extension of the log file

 %M

Name of log file without extension

 ?"<param-name>"(def1,def2,...)

A parameter value that will be asked for on every tool launch. The optional param-name is only used for the parameter requester dialog. You can provide a list of pre-defined values (optional) which will be accessible in the requester dialog via combo box.

{<regex>} {<replace>}

A Regex-Search/Replace operation will be done on the content of the current selected line. The result is added to the command line.

If you use the MultiFile feature, the log file name is always the correct name of the file which contains the currently selected line. (remember that MultiFile treats 2 or more files like a single concatenated file). The line number will also be corrected.

The curly braces used as the regex markers will be removed and are not part of the regex. Curly braces used in regex itself will not be removed of course. Only the outer braces will be removed. 

Pipe sysout to tab

If this option is checked, LogExpert will redirect all output (stdout) of the external tool to a tab window (a new tab will be opened).

Columnizer for output

Here you can select a Columnizer which will be used for the output tab. Only available if "Pipe sysout to tab" is enabled.

Icon button

You can choose any icon that you like. The icon doesn't need to be in the executable for the tool. It can be in any other executable, dll or icon file.

Tool Arguments Help

You can use the button on the right of the argument input field to show a helper dialog. In this dialog you see a summary of all the variables described above. Edit the argument line and click on the "Test" button to see the result. You see the result as it would be given as the argument line to the lauched tool.

Regex-Example:

Regex is useful to parse compiler output an find the file name and line numbers. Imagine the following line in the build log of a C++ compiler:

c:\work\listplugsample\listplug.cpp(155) : warning C4996: 'stricmp' was declared deprecated

You can use the following 2 regex/replace-expressions to parse out file name and line number from the compiler output

 File name

 {(.*)\(.*}{$1}

 Line number

 {.*\((\d*)\).*}{$1}

You can use both expressions on the argument line to start an editor with file name and line number. The argument line for UltraEdit in this example would be:

{(.*)\(.*}{$1}/{.*\((\d*)\).*}{$1}

(File name, slash, line number)