Log Data Source Script

In this article: This is a special type of log data source which allows you using script to provide raw log data. You can create multiple log data source scripts as custom log data sources. Please refer to How Does ULogViewer Read and Parse Logs for the role of log data source.

Creating and Managing

There are 3 ways to open dialog to manage log data source scripts:

Through Edit Log Profile Dialog

  1. Open 'Edit log profile' dialog. There are 2 ways to open the dialog:
    • Click on tool bar, find the log profile and click on the log profile.
    • Click drop-down arrow besides on tool bar and click 'Edit '(log profile name)'…' in menu.
  2. Find 'Data source' in 'Log Reading' section.
  3. Click [Manage log data source scripts…].

Through Tools Menu

Windows/Linux Users

  1. Click at right hand side of toolbar.
  2. Click 'Tools > Manage log data source scripts…' in menu.

macOS Users

  1. Click 'Tools > Manage log data source scripts…' in menu at top of screen.

Through Other Actions Menuv4.0+

Windows/Linux Users

  1. Click at right hand side of toolbar.
  2. Click 'Edit log data source script '(name)'' in menu.

macOS Users

  1. Click 'ULogViewer > Edit log data source script '(name)'' in menu at top of screen.
⬆️ Back to top

Embedded Log Data Source Scriptv3.0+

Log data source script is allowed being embedded in log profile and used by log profile directly.

Creating and Modifying

There are 2 ways to create or modify embedded log data source script:

Through Edit Log Profile Dialog

  1. Open 'Edit log profile' dialog. There are 2 ways to open the dialog:
    • Click on tool bar, find the log profile and click on the log profile.
    • Click drop-down arrow besides on tool bar and click 'Edit '(log profile name)'…' in menu.
  2. Find 'Embedded log data source script' in 'Log Reading' section.
  3. Click [Create…], [Edit…], [Import from file…], [Import existing] or [Remove].

Through Other Actions Menuv4.0+

Windows/Linux Users
  1. Click at right hand side of toolbar.
  2. Click 'Edit embedded log data source script' in menu.
macOS Users
  1. Click 'ULogViewer > Edit embedded log data source script' in menu at top of screen.

Use Embedded Log Data Source Script

  1. Open 'Edit log profile' dialog.
  2. Find 'Data source' in 'Log Reading' section.
  3. Click drop-down field and select 'Embedded log data source script'.
⬆️ Back to top

Scripting Basis

Please refer to Scripting in Application for basis of scripting.
⬆️ Back to top

Supported Source Options

You can specify one or more supported data source options for each log data source script. The supported data source options will be listed in dialog 'Data source options' when editing log profile. ULogViewer makes sure that the value of option will be set before starting logs reading if the option is marked as 'Required'.
⬆️ Back to top

Languages

You can use the following languages to create Log Data Source Scripts:
⬆️ Back to top