Skip to content
forked from mbehr1/smart-log

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

tiolan/smart-log

 
 

Repository files navigation

Smart-Log README

Visual Studio Marketplace 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 Visual Studio Marketplace Version to handle large log files (few hundred MBs).

Note: The time-sync feature works well with Visual Studio Marketplace Version for DLT (diagnostic log and trace) and Visual Studio Marketplace Version for pcap/pcapng-network trace files.

Features

  • Configurable event tree-view: Icons in tree-view

    • Helps quickly to understand the structure or to highlight events (errors/warnings,...).
    • Icons can be added to the tree-view.
    • Quickly jump to the event by selecting the item in the tree-view.
    • Open a text document with the full set of events or the selected event and its leaves.
    • Compare two tree events quickly (select/click one tree event and then click on the diff icon on the 2nd event)
  • 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....
    • If a time was received already the adjust-time... will propose to adjust/sync that line to the selected one.
    • 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).

    Note: Time sync is restricted to documents within the same workspace/editor window and revealing line works if used with multiple columns/rows (so the documents must be visible).

  • 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).

GitHub ♥︎ Sponsors are welcome!

Planned features

  • Add possibility to select from which other documents time events should be considered.
  • 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 support to modify parent title
  • add decoration for time-sync

Release Notes

See Changelog

semantic-release release

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

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%