macos - tmux 在 OS X 上的什么地方保存日志

标签 macos terminal crash tmux tmuxinator

tmux 最近经常崩溃,我不确定为什么。我想进一步研究它,但我不知道在哪里可以找到任何类型的日志或错误消息。到目前为止,我在谷歌上搜索“tmux 日志位置”之类的内容是空的。

我正在运行 OS X,并通过 Homebrew 安装了 tmux。

最佳答案

手册页需要一些改进(您一开始可能看不到该功能)。但是从源码开始(引用tty.c中的2.1版本)你可能会看到

    if (debug_level > 3) {
            xsnprintf(out, sizeof out, "tmux-out-%ld.log", (long) getpid());
            fd = open(out, O_WRONLY|O_CREAT|O_TRUNC, 0644);
            if (fd != -1 && fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
                    fatal("fcntl failed");
            tty->log_fd = fd;
    }

-v 标志设置debug_level 值;重复它会增加值(value)。返回手册页:

-v
Request verbose logging. This option may be specified multiple times for increasing verbosity. Log messages will be saved into tmux-client-PID.log and tmux-server-PID.log files in the current directory, where PID is the PID of the server or client process.

关于macos - tmux 在 OS X 上的什么地方保存日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36098257/

相关文章:

java - <Java> 客户端/服务器聊天应用程序在编译时没有响应

java - 调试时无法实例化 Activity 问题

java - 如何确保 Mac 上的 Java 应用程序中的 open 命令调用 main 函数

ios - swift 中奇怪的泛型行为

ubuntu - 在 ubuntu 上安装 Sublime (add-apt-repository 错误)

php - php继续在服务器上崩溃

ios - Xcode 5 预期标识符错误不会消失

Eclipse 声明快捷键 F3 在 mac os 中无法使用

linux - 从 TypeScript 运行任何 Linux 终端命令?

java - android 在某些情况下无法写入屏幕