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

Disable debugging (for kbfs) #3155

Open
crahan opened this issue Jan 8, 2018 · 8 comments · May be fixed by keybase/client#26131
Open

Disable debugging (for kbfs) #3155

crahan opened this issue Jan 8, 2018 · 8 comments · May be fixed by keybase/client#26131

Comments

@crahan
Copy link

crahan commented Jan 8, 2018

I recently noticed that my keybase.kbfs.log and keybase.service.log files were nearing around 100MB in size, each. It appears that both contain quite a bit of [DEBU ] statements.

When I run keybase -d status I can see that kbfs is started with the debug flag: /Applications/Keybase.app/Contents/SharedSupport/bin/kbfs -debug -log-file=/Users/crahan/Library/Logs/keybase.kbfs.log

Is there a way to disable this debug flag? Can we add --no-debug to the master config.json file to help prevent this. If so, can someone provide an example?

@docsmooth
Copy link

Same thing on Linux. If you update the systemd configuration to remove the debug flag, it'll get added back in on the next reboot. I also couldn't find a setting in /etc/default/keybase that would disable this either.

@heronhaye
Copy link

heronhaye commented Aug 1, 2019

@docsmooth

Use systemd drop-in units instead.

For example, systemctl --user edit keybase, and add

[Service]
ExecStart=
ExecStart=keybase --use-default-log-file service

, and systemctl --user edit kbfs, and add

[Service]
ExecStart=
ExecStart=kbfsfuse -log-to-file

Note this is unsupported and we won't be able to help you if you run into issues (unless you turn on logs again and reproduce the bug).

(I've updated these to remove only debugging)

@docsmooth
Copy link

I don't want to disable all logging, because I want to catch errors. I just don't want debug logging. Debug logging on a laptop eats up measurable battery life (keybase is consistently higher than chrome, unless I simply remove "debug" from the systemd config).

@heronhaye
Copy link

You can do that with drop-in units too. See https://askubuntu.com/a/659268.

@docsmooth
Copy link

So that anyone reading the thread isn't confused: #3155 (comment) (including @heronhaye 's edit) does work, and survives both reboots and updates to keybase (tested on Ubuntu 19.04)

@crahan
Copy link
Author

crahan commented Aug 15, 2019

Any updates on how to resolve this on macOS?

@Mansarde
Copy link

@heronhaye Can this be done in Windows as well?
I tried to start keybase with keybase --no-debug ctl start.
The process then shows to be started with both debug flags (--no-debug --debug).
But even though the documentation (keybase help advanced) says that no-debug takes precedence over debug it still writes debug messages to log.

@GwynethLlewelyn
Copy link

Piping in a bit late, but I wonder as well how it's done under macOS. Same reason as @docsmooth — even though I haven't noticed much of a battery drain myself, but it's a question of not wasting resources — I'm not actively developing anything on top of Keybase (yet!) so I don't really need to deal with debugging logs, for now.

Thanks for the systemd drop-in units tip, though; they're cool for the many devices and servers I've got around the world which do use systemd (as opposed to Apple's own launchd which predates systemd and inspired it, but is not quite the same thing...).

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

Successfully merging a pull request may close this issue.

5 participants