Closed evgmik closed 3 years ago
We can just send it to both syslog and stdout (if stdout is conneced to a tty) at that point.
Why do we send password helper function to server/server.go if it is used only once? Would it be better to send password itself?
Historic reasons: I had plans to store the repository encrypted permanently and only hold all relevant files in memory (bit like an encFS
). I stopped implementing that, so it could be cleaned up and made a part of the CLI instead of the server.
I did a small quick fix here: 9f2e5a94c163eb67e5acc74540a11ceeaaed8f9b
Can be improved in the following ways:
Could you elaborate on logrus issues? It seem to work for us, except that it seems to be able only one colorscheme. So once we switched to syslog, it strips colors.
Other than this it works, and we probably do not need extra speed in logging which is promised by other newer loggers.
Correct, it's not a real issue. It's just that I don't like the logrus
API very much and found it often awkward to use. So really low priority, just want to change it when I get the chance (shouldn't be hard, can be automated mostly). Highest prio of the bunch has this point:
Clean up password handling and move to client (it's a UI/UX thing, that's where it belongs anyways).
Closing, since original issue had been addressed. The rest is refactoring.
Currently, if something go wrong
brig daemon launch
fails without error message to stdout. The default is to send all logs to syslog but if we fail the user should know why. A typical case scenario, user does not have keyphrase loaded for the password manager (pass
in my case), thenbrig
daemon cannot start up, but user see no hints for it:We are back to command line and everything seems to be good (excerpt error code 4). But actually password read out fails and daemon is not running.
Cause of the issue: the log is tuned to send to syslog and does not switch back on exit. We probably should report grave mistakes to stdout as well.
Related question
Why do we send password helper function to
server/server.go
if it is used only once? Would it be better to send password itself?