File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -196,18 +196,27 @@ public IEnumerable<IProtoUrlConfig> Run()
196196 databaseConfigs = LoadCache ( ) ;
197197 }
198198
199- #if false
200199 // Using an dedicated external log is nice. Dumping it into KSP.log breaking the known formats is not.
200+ // But...
201+ // Now I see the reason this was done this way. Asking the user to send KSP.log is tricky by itself, and
202+ // sending more than one log is yet more troublesome.
203+ // What I can do is to only dump this on KSP.log when the KSPe.Util.Log.Level is bigger than Info.
204+ // (the default KSPe's Global for Module Manager as from KSPe 2.2.3)
205+ string patchLogPath = KSPe . IO . File < Startup > . Data . Solve ( FilePathRepository . PATCH_LOG_FILENAME + ".log" ) ;
201206 if ( File . Exists ( patchLogPath ) )
202207 {
203- logger . Info ( "Dumping patch log" ) ;
204- logger . Info ( "\n #### BEGIN PATCH LOG ####\n \n \n " + File . ReadAllText ( patchLogPath ) + "\n \n \n #### END PATCH LOG ####" ) ;
208+ if ( ModLogger . LOG . level > KSPe . Util . Log . Level . INFO )
209+ {
210+ logger . Info ( "Dumping patch log" ) ;
211+ logger . Info ( "\n #### BEGIN PATCH LOG ####\n \n \n " + File . ReadAllText ( patchLogPath ) + "\n \n \n #### END PATCH LOG ####" ) ;
212+ }
213+ else
214+ logger . Info ( "The Patch log can be found on " + patchLogPath ) ;
205215 }
206216 else
207217 {
208218 logger . Error ( "Patch log does not exist: " + patchLogPath ) ;
209219 }
210- #endif
211220
212221 logger . Info ( status ) ;
213222
You can’t perform that action at this time.
0 commit comments