Skip to content

Visual Studio Code extension that provides analysis and visualization features for text based log files.

Notifications You must be signed in to change notification settings

mbehr1/smart-log

Repository files navigation

Smart-Log README

Version

This Visual Studio Code(tm) extension adds analysis and visualization features for log files and should ease debugging especially of complex systems where multiple log files need to be considered at the same time.

Smart-Log in action

Note: It works well with Version to handle large log files (few hundred MBs).

Note: The time-sync feature works well with Version for DLT (diagnostic log and trace) files.

Features

  • Configurable event tree-view (todo picture):

    • Helps quickly to understand the structure or to highlight events (errors/warnings,...).
    • Quickly jump to the event by selecting the item in the tree-view.
  • Configurable decorations (todo picture).

  • Time sync feature (todo movie...):

    • Detects time for each line.
    • An offset for the full file can be set via context menu item adjust time....
    • Posts events of the selected time to other documents/plugins. (See ... ).
    • Allows to "synchronize" this time with other visible documents from all plugins that support "onDidChangeSelectedTime" events.
    • Automatic time synchronization of multiple documents by "time-sync events" (see settings event.timeSyncId and event.timeSyncPrio) (todo add example).
  • Allows configuration of multiple file types (see settings smart-log.fileConfigs).

Requirements

To open large log files please consider installing "vsc-lfs" extension.

Extension Settings

This extension contributes the following settings:

  • smart-log.timeRegex: Regular expression (regex) to identify the time of a log line.
  • smart-log.timeFormat: Optional time format specifier (details see config example).
  • smart-log.decorations: Definition of the decoration types supported for events.
  • smart-log.fileConfigs: Definition of the configuration per file type.

(todo add example configs)

Known Issues

  • processing large files is kind of slow. Need to process time info and decorations in the background.

Contributions

Any and all test, code or feedback contributions are welcome. Open an issue or create a pull request to make this extension work better for all.

Donations are welcome! (Contact me for commercial use or different license).

Planned features

  • Use outline instead of own tree view
  • add filtering based on events (remove all but the events)
  • automatic timezone detection
  • change "smart-log" file type automatically to sub-types
  • change file type back to e.g. Log or Plain text if no config is found.
  • add event icon support in tree view
  • add event support to modify parent title
  • add decoration for time-sync

Release Notes

See Changelog

Third-party Content

This project leverages the following third party content.

d3-time-format (2.2.3)

About

Visual Studio Code extension that provides analysis and visualization features for text based log files.

Resources

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published