mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Support to configure logging levels for sqltools services (#2731)
* Adding support for configuring SqlTools log levels from user configuration. This also adds changes to see the tail of the sqltoolsservicelayer log file in the newly created 'Output->Log (SqlTools)' channel * Three new user settings control how logging happens. tracingLevel, logRetentionMinutes & logFilesRemovalLimit. Default tracingLevel is set to 'Critical'. * The logfiles include ui Extension host process id in their log file names. This ensures that filenames from multiple instances of Azure Data Studio running do not collide with each other. Furthermore log directory for being used for the tools service backend processes. This ensures that there is no name conflict when multiple instances of azuredatastudio are running on the same box. Also when azuredatastudio is started from vscode under debugger the log directory is set to %APPDATA%\Code\mssql while the official location is %APPDATA%\azuredatastudio\mssql. So dev environment should not affect other running instances. Kindly note that all debug runs of azuredatastudio share the same directory and all non debug runs share a directory different from those running under debugger. * Log files older than a week get cleaned up upon start-up. The log file cleanup behavior can be controlled at user level by logRetentionMinutes & logFilesRemovalLimit settings.
This commit is contained in:
@@ -93,7 +93,31 @@
|
||||
"mssql.logDebugInfo": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "[Optional] Log debug output to the VS Code console (Help -> Toggle Developer Tools)"
|
||||
"description": "[Optional] Log debug output to the console (View -> Output) and then select appropriate output channel from the dropdown"
|
||||
},
|
||||
"mssql.tracingLevel": {
|
||||
"type": "string",
|
||||
"description": "[Optional] Log level for backend services. Azure Data Studio generates a file name every time it starts and if the file already exists the logs entries are appended to that file. For cleanup of old log files see logRetentionMinutes and logFilesRemovalLimit settings. The default tracingLevel does not log much. Changing verbosity could lead to extensive logging and disk space requirements for the logs. Error includes Critical, Warning includes Error, Information includes Warning and Verbose includes Information",
|
||||
"default": "Critical",
|
||||
"enum": [
|
||||
"All",
|
||||
"Off",
|
||||
"Critical",
|
||||
"Error",
|
||||
"Warning",
|
||||
"Information",
|
||||
"Verbose"
|
||||
]
|
||||
},
|
||||
"mssql.logRetentionMinutes": {
|
||||
"type": "number",
|
||||
"default": 10080,
|
||||
"description": "Number of minutes to retain log files for backend services. Default is 1 week."
|
||||
},
|
||||
"mssql.logFilesRemovalLimit": {
|
||||
"type": "number",
|
||||
"default": 100,
|
||||
"description": "Maximum number of old files to remove upon startup that have expired mssql.logRetentionMinutes. Files that do not get cleaned up due to this limitation get cleaned up next time Azure Data Studio starts up."
|
||||
},
|
||||
"ignorePlatformWarning": {
|
||||
"type": "boolean",
|
||||
|
||||
Reference in New Issue
Block a user