@@ -67,6 +67,7 @@ export class Logger {
6767 private static instance : Logger ;
6868 private tomcatHome : string ;
6969 private autoDeployMode : string ;
70+ private autoScrollOutput : boolean ;
7071 private outputChannel : vscode . OutputChannel ;
7172 private statusBarItem ?: vscode . StatusBarItem ;
7273 private currentLogFile : string | null = null ;
@@ -84,7 +85,8 @@ export class Logger {
8485 */
8586 private constructor ( ) {
8687 this . tomcatHome = vscode . workspace . getConfiguration ( ) . get < string > ( 'tomcat.home' , '' ) ;
87- this . autoDeployMode = vscode . workspace . getConfiguration ( ) . get < string > ( 'tomcat.autoDeployMode' , 'Disabled' ) ;
88+ this . autoDeployMode = vscode . workspace . getConfiguration ( ) . get < string > ( 'tomcat.autoDeployMode' , 'Disabled' ) ;
89+ this . autoScrollOutput = vscode . workspace . getConfiguration ( ) . get < boolean > ( 'tomcat.autoScrollOutput' , true ) ;
8890 this . outputChannel = vscode . window . createOutputChannel ( 'Tomcat' , 'tomcat-log' ) ;
8991 }
9092
@@ -116,6 +118,7 @@ export class Logger {
116118 public updateConfig ( ) : void {
117119 this . tomcatHome = vscode . workspace . getConfiguration ( ) . get < string > ( 'tomcat.home' , '' ) ;
118120 this . autoDeployMode = vscode . workspace . getConfiguration ( ) . get < string > ( 'tomcat.autoDeployMode' , 'Disabled' ) ;
121+ this . autoScrollOutput = vscode . workspace . getConfiguration ( ) . get < boolean > ( 'tomcat.autoScrollOutput' , true ) ;
119122 }
120123
121124 /**
@@ -445,10 +448,8 @@ export class Logger {
445448 const timestamp = new Date ( ) . toLocaleString ( ) ;
446449 const formattedMessage = `[${ timestamp } ] [${ level } ] ${ message } ` ;
447450
448- // Write to output channel
449451 this . outputChannel . appendLine ( formattedMessage ) ;
450452
451- // Conditionally show UI notification
452453 if ( showUI ) {
453454 showUI ( message ) . then ( selection => {
454455 if ( selection ) {
@@ -457,8 +458,7 @@ export class Logger {
457458 } ) ;
458459 }
459460
460- // Automatically show errors in output channel
461- if ( level === 'ERROR' || level === 'WARN' ) {
461+ if ( this . autoScrollOutput || level === 'ERROR' || level === 'WARN' ) {
462462 this . outputChannel . show ( true ) ;
463463 }
464464 }
0 commit comments