Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Log with OSLog #43

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Log with OSLog #43

wants to merge 1 commit into from

Conversation

HeEAaD
Copy link

@HeEAaD HeEAaD commented Nov 2, 2023

Motivation

Observing the "SSH" log of the Cilicon.app requires to login to the host machine via remote desktop or VNC, because the log is not accessible on the command line.

Description

This PR logs all string that are logged to the "SSH" window also to the system log. Further its replaces all print statements with OSLog calls.

Examples

Get past "SSH" output:

log show --style compact --predicate 'subsystem=="com.traderepublic.cilicon" and category == "SSH"'

Get live "SSH" output:

log stream --style compact --predicate 'subsystem=="com.traderepublic.cilicon" and category == "SSH"'

Get all log messages (including debug and info):

log show --style compact --predicate 'subsystem=="com.traderepublic.cilicon"' --info --debug

@HeEAaD HeEAaD requested a review from Marcocanc November 2, 2023 13:52
@Halle
Copy link

Halle commented Nov 2, 2023

Just a data point, something I like about Cilicon is that host logging of the session isn't a big consideration for the self-hosting threat model. Maybe this could be an opt-in debug feature only?

@Marcocanc
Copy link
Member

@Halle good point, @HeEAaD or what about making it opt-out?

@HeEAaD
Copy link
Author

HeEAaD commented Nov 7, 2023

I would not consider this as a debug feature. But I agree, it might be better to have logging to the system as an opt-in feature because it might be unexpected that the output ends up in the system log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants