Skip to content

Log to syslog on Linux #1286

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
ahoppen opened this issue May 13, 2024 · 0 comments · Fixed by #1411
Closed

Log to syslog on Linux #1286

ahoppen opened this issue May 13, 2024 · 0 comments · Fixed by #1411

Comments

@ahoppen
Copy link
Member

ahoppen commented May 13, 2024

On Linux, we can log to syslog like we log to os_log on Darwin. That should allow us to also recapture logs in sourcekit-lsp diagnose.

rdar://127138318

ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this issue Jun 3, 2024
Instead of logging to `stderr`, write log messages to files in `/var/log/sourcekit-lsp/sourcekit-lsp-<pid>.log`.

This allows us to retrieve the log messages from `sourcekit-lsp diagnose`.

We should be able to expand this to also write to log files on Windows but I still need to figure out what an appropriate log directory might be. That will be a follow-up PR.

Fixes swiftlang#1286
rdar://127138318
ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this issue Jun 3, 2024
Instead of logging to `stderr`, write log messages to files in `/var/log/sourcekit-lsp/sourcekit-lsp-<pid>.log`.

This allows us to retrieve the log messages from `sourcekit-lsp diagnose`.

We should be able to expand this to also write to log files on Windows but I still need to figure out what an appropriate log directory might be. That will be a follow-up PR.

Fixes swiftlang#1286
rdar://127138318
ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this issue Jun 4, 2024
Instead of logging to `stderr`, write log messages to files in `/var/log/sourcekit-lsp/sourcekit-lsp-<pid>.log`.

This allows us to retrieve the log messages from `sourcekit-lsp diagnose`.

We should be able to expand this to also write to log files on Windows but I still need to figure out what an appropriate log directory might be. That will be a follow-up PR.

Fixes swiftlang#1286
rdar://127138318
ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this issue Jun 4, 2024
Instead of logging to `stderr`, write log messages to files in `.sourcekit-lsp/logs/sourcekit-lsp-<pid>.<log index>.log`.

This allows us to retrieve the log messages from `sourcekit-lsp diagnose`.

We should be able to expand this to also write to log files on Windows but I still need to figure out what an appropriate log directory might be. That will be a follow-up PR.

Fixes swiftlang#1286
rdar://127138318
ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this issue Jun 5, 2024
Instead of logging to `stderr`, write log messages to files in `.sourcekit-lsp/logs/sourcekit-lsp-<pid>.<log index>.log`.

This allows us to retrieve the log messages from `sourcekit-lsp diagnose`.

We should be able to expand this to also write to log files on Windows but I still need to figure out what an appropriate log directory might be. That will be a follow-up PR.

Fixes swiftlang#1286
rdar://127138318
ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this issue Jun 5, 2024
Instead of logging to `stderr`, write log messages to files in `.sourcekit-lsp/logs/sourcekit-lsp-<pid>.<log index>.log`.

This allows us to retrieve the log messages from `sourcekit-lsp diagnose`.

Fixes swiftlang#1286
rdar://127138318
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant