File tree Expand file tree Collapse file tree 3 files changed +17
-11
lines changed Expand file tree Collapse file tree 3 files changed +17
-11
lines changed Original file line number Diff line number Diff line change 356356 },
357357 "omnisharp.loggingLevel" : {
358358 "type" : " string" ,
359- "default" : " default " ,
359+ "default" : " information " ,
360360 "enum" : [
361- " default" ,
362- " verbose"
361+ " trace" ,
362+ " debug" ,
363+ " information" ,
364+ " warning" ,
365+ " error" ,
366+ " critical"
363367 ],
364368 "description" : " Specifies the level of logging output from the OmniSharp server."
365369 },
Original file line number Diff line number Diff line change @@ -33,7 +33,12 @@ export class Options {
3333 ? csharpConfig . get < boolean > ( 'omnisharpUsesMono' )
3434 : omnisharpConfig . get < boolean > ( 'useMono' ) ;
3535
36- const loggingLevel = omnisharpConfig . get < string > ( 'loggingLevel' ) ;
36+ // support the legacy "verbose" level as "debug"
37+ let loggingLevel = omnisharpConfig . get < string > ( 'loggingLevel' ) ;
38+ if ( loggingLevel . toLowerCase ( ) === 'verbose' ) {
39+ loggingLevel = 'debug' ;
40+ }
41+
3742 const autoStart = omnisharpConfig . get < boolean > ( 'autoStart' , true ) ;
3843
3944 const projectLoadTimeout = omnisharpConfig . get < number > ( 'projectLoadTimeout' , 60 ) ;
Original file line number Diff line number Diff line change @@ -235,20 +235,17 @@ export class OmniSharpServer {
235235
236236 const solutionPath = launchTarget . target ;
237237 const cwd = path . dirname ( solutionPath ) ;
238+ this . _options = Options . Read ( ) ;
239+
238240 let args = [
239241 '-s' , solutionPath ,
240242 '--hostPID' , process . pid . toString ( ) ,
241243 '--stdio' ,
242244 'DotNet:enablePackageRestore=false' ,
243- '--encoding' , 'utf-8'
245+ '--encoding' , 'utf-8' ,
246+ '--loglevel' , this . _options . loggingLevel
244247 ] ;
245248
246- this . _options = Options . Read ( ) ;
247-
248- if ( this . _options . loggingLevel === 'verbose' ) {
249- args . push ( '-v' ) ;
250- }
251-
252249 this . _logger . appendLine ( `Starting OmniSharp server at ${ new Date ( ) . toLocaleString ( ) } ` ) ;
253250 this . _logger . increaseIndent ( ) ;
254251 this . _logger . appendLine ( `Target: ${ solutionPath } ` ) ;
You can’t perform that action at this time.
0 commit comments