CHARON Log files - Using vim for syntax highlighting on Linux and Windows

Table of contents

Global description

For ease of reading it is possible to use some tools to highlight some lines in the CHARON log files. "vim" is one of these tools. We will explain here how to setup this tool and use the customized configuration file.

Linux

Description

If 'vim' editor is installed on your Linux server, it is possible to use a command file to highlight log lines based on their error level or depending on strings matched.

Syntax highlighting

Settings

Download the configuration file customized for CHARON logs:

Usage

# vim -u <configuration file> <log file>

Example1 - Character User Interface:

# vim -u /charon/charonlog.vimrc /charon/pluto.log


(info) The vimrc file also works with the graphical version of 'vim' if installed: 'gvim'

Example2 - Graphical User Interface:

# gvim -u /charon/charonlog.vimrc /charon/pluto.log


(lightbulb) For ease of use, it is also possible to copy the charonlog.vimrc file to $HOME/.vimrc, the "-u <configuration file>" parameter is then no more needed

Examples

Example1 - CUI:

Example2 - CUI:

Example3 - GUI:

Windows

Description

'vim' for windows can be downloaded here: http://www.vim.org/download.php

or from this page:

Syntax highlighting

Settings

Download the configuration file customized for CHARON logs:

Copy it to your Windows home folder ( %UserProfile% ) as _vimrc

Example:

C:\Users\Charon\Downloads>copy charonlog.vimrc %userprofile%\_vimrc

Usage

Find your log file and open it with 'gvim'. If you enabled the context menu option (default), right click on your log file and select 'Edit with Vim'.

(warning) If the version of CHARON-AXP/VAX is too old, there could be some display issues due to the file format

Example

Related articles



© Stromasys, 1999-2024  - All the information is provided on the best effort basis, and might be changed anytime without notice. Information provided does not mean Stromasys commitment to any features described.