Fix some logging issues

This commit is contained in:
crschnick 2024-10-13 09:09:25 +00:00
parent 51d434c3e0
commit 0b9c62b285

View file

@ -66,9 +66,10 @@ public class TerminalLauncher {
var prefix = entry != null && color != null && type.supportsColoredTitle() ? color.getEmoji() + " " : ""; var prefix = entry != null && color != null && type.supportsColoredTitle() ? color.getEmoji() + " " : "";
var cleanTitle = (title != null ? title : entry != null ? entry.getName() : "?"); var cleanTitle = (title != null ? title : entry != null ? entry.getName() : "?");
var adjustedTitle = prefix + cleanTitle; var adjustedTitle = prefix + cleanTitle;
var log = AppPrefs.get().enableTerminalLogging().get();
var terminalConfig = new TerminalInitScriptConfig( var terminalConfig = new TerminalInitScriptConfig(
adjustedTitle, adjustedTitle,
type.shouldClear() && AppPrefs.get().clearTerminalOnInit().get(), !log && type.shouldClear() && AppPrefs.get().clearTerminalOnInit().get(),
cc instanceof ShellControl ? type.additionalInitCommands() : TerminalInitFunction.none()); cc instanceof ShellControl ? type.additionalInitCommands() : TerminalInitFunction.none());
var request = UUID.randomUUID(); var request = UUID.randomUUID();
var config = createConfig(request, entry, cleanTitle, adjustedTitle); var config = createConfig(request, entry, cleanTitle, adjustedTitle);
@ -129,7 +130,7 @@ public class TerminalLauncher {
} else { } else {
var content = var content =
""" """
script --command "%s" "%s" script --quiet --command "%s" "%s"
""" """
.formatted(preparationScript, logFile); .formatted(preparationScript, logFile);
var ps = ScriptHelper.createExecScript(sc.getShellDialect(), sc, content); var ps = ScriptHelper.createExecScript(sc.getShellDialect(), sc, content);