Overview

Motivation

Statistics

JS/TS

Insert a log message

Comment inserted log messages

Uncomment log messages

Delete log messages

Correct log messages

PHP (Pro)

Insert a log message

Comment inserted log messages

Uncomment log messages

Delete log messages

Correct log messages

Settings

Custom Prefix

Custom Suffix

Log Function Type

Log Function Name

Custom delimiter

Custom quote

Use semicolon

Enclosing class

Enclosing function

Include file name and line number

Include file name

Include line num

Wrap log message

Line before log message

Line after log message

Log Function Name

Presentation

The logFunction setting gives you the ability to specify a custom log function to use instead of the default console.log. This is especially helpful when you have a specific logging utility function in your project that you'd like to use for these automated log messages.

Usage

  1. To modify the Log Function setting: Head to the settings in VS Code: File β†’ Preferences β†’ Settings (or Code β†’ Preferences β†’ Settings on Mac). Search for "Turbo Console Log" and find the logFunction setting. Enter the name of your custom log function into the input field.

  2. In your code: After setting the function name, when you use the Turbo Console Log command, it will insert your custom log function in the generated log statements. For instance, if you've defined a function called "myCustomLogger", the inserted log message would look like this:

myCustomLogger('πŸš€ ~ SelectedVariable:', SelectedVariable);

The logFunction setting is particularly useful when you need to use a project-specific logging utility function for your automated log messages. Keep in mind that if no function name is specified, the default "console.log" will be used.