Overview
Features
Settings
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
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.
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.