Overview

Motivation

Statistics

Features

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

Join the Turbo Tribe

30% Off

Subscribe to our newsletter to receive the latest updates, contribute to Turbo's future through surveys, and get an automatic 30% discount on Turbo Pro!

Get Latest Updates

Shape Turbo's Future

30% Off Turbo Pro

Get 30% off • Shape the future • Zero spam

Log Function Name

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.