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

Add logging for daemon #12

Open
AdamISZ opened this issue Nov 25, 2016 · 10 comments
Open

Add logging for daemon #12

AdamISZ opened this issue Nov 25, 2016 · 10 comments

Comments

@AdamISZ
Copy link
Member

AdamISZ commented Nov 25, 2016

No description provided.

@AdamISZ
Copy link
Member Author

AdamISZ commented Jul 27, 2017

This is basically just adding a logfile for the daemon to the existed twisted-based logging (startLogging i believe takes an argument). Should be simple enough.

@mecampbellsoup
Copy link
Contributor

Which is more urgent, this issue or #38?

@mecampbellsoup
Copy link
Contributor

I would personally vote for this one since I don't use Qt and am currently looking to see if there is a log file I can tail to debug my yield-generator.py script...

@AdamISZ
Copy link
Member Author

AdamISZ commented Sep 13, 2017

@mecampbellsoup yes thanks, it would be good to take a look at this. i actually haven't looked into it for ages, let me know if you have any questions. be aware that in future it's definitely intended that people may run this as a separate process on a different machine, in case that factors into any decision.

@AdamISZ
Copy link
Member Author

AdamISZ commented Sep 13, 2017

if there is a log file I can tail to debug my yield-generator.py script...

on this, first, you know there is a logfile in logs/randomname.log for each run, right? This will contain whatever log.debug, log.info etc messages are in the code. Twisted network logging is not included, though, because as you can see startLogging is commented out (iirc in the start_reactor method in client_protocol module).

Just mentioning in case you weren't fully aware what's there already. The client-side logging is going to cover most of what you need for debugging a client-side script (which yg is one of).

@mecampbellsoup
Copy link
Contributor

@AdamISZ ah nice, I did not actually realize that!

(jmvenv) foo@bar:~/joinmarket-clientserver/scripts$ tail -f logs/[REDACTED].log 
2017-09-13 10:52:45,384 [MainThread  ] [DEBUG]  building irc
2017-09-13 10:52:45,385 [MainThread  ] [DEBUG]  building irc

Seems to be hanging on this initialization step...

@AdamISZ
Copy link
Member Author

AdamISZ commented Sep 13, 2017

It'd be a good idea to come on #joinmarket on freenode IRC for help with stuff like that.

@mecampbellsoup
Copy link
Contributor

@AdamISZ so this issue specifically relates to adding Twisted logging? What would you say are the specs/behavior changes for this issue so I have clarity on that?

@AdamISZ
Copy link
Member Author

AdamISZ commented Sep 16, 2017

I hadn't decided for sure what kind of logging should be done. When running everything-in-one (i.e. daemon and client in same process) it'd be nice that any info/error messages get added to logs/J5***.log). As for Twisted logging, it can be started with twisted.python.log.startLogging(file) iirc, I'm finding it's useful to activate for testnet but much too noisy for normal use; so I'm not sure whether I agree with my original comment about it or not :) Just not sure really. I'm not really sure how important this is; it'll be annoying for a user if it dies and there's no logging errors I guess. Sorry I realise that isn't particularly helpful for you, probably just leave it.

If you want to help out the first thing I'd do is figure out how to do runs in the testing environment (see TESTING.md) and try to get to the point where you can do whole tumbler.py runs on regtest. That puts you in a good position to try stuff out.

@AdamISZ
Copy link
Member Author

AdamISZ commented Sep 18, 2017

It crossed my mind today what the main reason was for opening the issue (it was a long time ago!) - received privmsgs are not printed out to the debug log (those sent out, are). This is obviously a significant loss of useful debugging information. So addressing this issue should at least change that (example: a taker should be able to see all the !ioauth privmsgs he receives in a transaction).

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

No branches or pull requests

2 participants