
To override the color for one of these, use the editor.tokenColorCustomizations user setting, which was introduced in Visual Studio Code 1.15. Sometimes this will result in colors that may not make complete sense in the log file context (for example ERROR might be green and DEBUG red, when it would be more appropriate to have it the other way around).įor this reason, the extension defines a special set of grammar tokens that can be used to override the colors of the default log items: log.constant log file,Ī status bar item is displayed that indicates how many days, hours, minutes, seconds and milliseconds you have selected.īy default, this extension reuses existing theme colors in order to adapt to the user's preferences.

Useful to identity namespace qualified type names, for example. Namespaces (sequences of alphanumeric and dot characters). lines starting with whitespace characters, followed by at, for example: System.NullReferenceException: Object reference not set to an instance of an object. MAC addresses (hex numbers separated by colons or dashes (':', '-') String constants, enclosed in single or double quotes. log files and applies coloring to the different elements in the file, for example:ĭates and times in some culture-specific formats However, if you want additional highlighting, customizable patterns and time duration calculation, then keep reading :-) Features Syntax Highlighting If the default behavior of log files in VS Code is good enough for you, then you don't need this extension.

The colors are customizable but by default the current color theme's colors are used.Īn earlier version of the syntax highlighting definition from this extension was included into Visual Studio Code version 1.20.

It is based on standard conventions for log4net log files but it's general enough to be useful for other variations of log files as well. A Visual Studio Code extension for adding color highlighting to log files.
