@@ -65,7 +65,7 @@ public OctoLogger(Action<string> writeToLog, Action<string> writeToVerboseLog, A
6565 private void Log ( string msg , string level )
6666 {
6767 var output = FormatMessage ( msg , level ) ;
68- output = MaskSecrets ( output ) ;
68+ output = Redact ( output ) ;
6969 if ( level == LogLevel . ERROR )
7070 {
7171 _writeToConsoleError ( output ) ;
@@ -84,7 +84,7 @@ private string FormatMessage(string msg, string level)
8484 return $ "[{ timeFormat } ] [{ level } ] { msg } \n ";
8585 }
8686
87- private string MaskSecrets ( string msg )
87+ private string Redact ( string msg )
8888 {
8989 var result = msg ;
9090
@@ -128,14 +128,14 @@ public virtual void LogError(Exception ex)
128128 var verboseMessage = ex is HttpRequestException httpEx ? $ "[HTTP ERROR { ( int ? ) httpEx . StatusCode } ] { ex } " : ex . ToString ( ) ;
129129 var logMessage = Verbose ? verboseMessage : ex is OctoshiftCliException ? ex . Message : GENERIC_ERROR_MESSAGE ;
130130
131- var output = MaskSecrets ( FormatMessage ( logMessage , LogLevel . ERROR ) ) ;
131+ var output = Redact ( FormatMessage ( logMessage , LogLevel . ERROR ) ) ;
132132
133133 Console . ForegroundColor = ConsoleColor . Red ;
134134 _writeToConsoleError ( output ) ;
135135 Console . ResetColor ( ) ;
136136
137137 _writeToLog ( output ) ;
138- _writeToVerboseLog ( MaskSecrets ( FormatMessage ( verboseMessage , LogLevel . ERROR ) ) ) ;
138+ _writeToVerboseLog ( Redact ( FormatMessage ( verboseMessage , LogLevel . ERROR ) ) ) ;
139139 }
140140
141141 public virtual void LogVerbose ( string msg )
@@ -148,7 +148,7 @@ public virtual void LogVerbose(string msg)
148148 }
149149 else
150150 {
151- _writeToVerboseLog ( MaskSecrets ( FormatMessage ( msg , LogLevel . VERBOSE ) ) ) ;
151+ _writeToVerboseLog ( Redact ( FormatMessage ( msg , LogLevel . VERBOSE ) ) ) ;
152152 }
153153 }
154154
0 commit comments