autolog.languages
: list of log settings for each language
$eSEL
: escaped selection ("
, '
, `
are escaped)
$SEL
: non-escaped selection
Format:
{
"<language_name>": {
"wrapper": "<(Required) format of log messages>",
"match": "<(Required) regular expression matching a log message, used for commenting and uncommenting>. Reference the default regexps below on how to write one.",
"comment": "<(Required) single line comment symbol.>",
"prefix": "<(Optional) log prefix for this language.>"
}
}
Default value:
{
"javascript": {
"wrapper": "console.log('$eSEL', $SEL)",
"match": "^(.*\\b)?console\\.log\\(([^)]*)\\);?.*$",
"comment": "//"
},
"typescript": {
"wrapper": "console.log('$eSEL', $SEL)",
"match": "^(.*\\b)?console\\.log\\(([^)]*)\\);?.*$",
"comment": "//"
},
"elm": {
"wrapper": "_ = Debug.log \"$eSEL\" <| $SEL",
"match": "^.*=\\s*(\n\\s*)?(\\-*\\s*)*Debug\\.log.*$",
"comment": "--",
"prefix": "AL -> "
},
"python": {
"wrapper": "print('$eSEL', $SEL)",
"match": "^(.*\\b)?print\\(([^)]*)\\).*$",
"comment": "#"
},
"default": {
"wrapper": "print($SEL);",
"match": "^(.*\\b)?print\\(([^)]*)\\).*$",
"comment": "//"
}
}
Default will be used if Auto Log doesn't find the log settings for the selected language. Follow the format to specify log settings for the languages you want that are not listed in the default value above. PRs are welcome for adding more default language log settings.