ssbc / secret-stack

connect peers to each other using secret-handshakes
MIT License
90 stars 19 forks source link

Use multiserver's default values instead of a dupicated effort #30

Closed regular closed 5 years ago

regular commented 6 years ago

How do you feel about the usage of the debug module here? I find it very useful.

christianbundy commented 6 years ago

I'm a fan of debug as long as we keep it out of performance-critical areas. I've been using the ssb: prefix in ssb-blob-content, which makes DEBUG=ssb:* pretty easy for debugging our stack, but I'm not sure whether that's the best way to go.

regular commented 6 years ago

@christianbundy oh, great, I am totally for a common prefix. I tried to look at ssb-blob-content but couldn't find it. So, you simply did

debug = require('debug')('ssb:blob-content')

?

christianbundy commented 6 years ago

Yeah, it's over on my gitlab while I'm still experimenting and trying to make it work right. The line in question is currently ssb:blob:content (as ssb:blob:* seemed like it would be useful in the future) but I may change it back to ssb:blob-content.

Another option would be to use ssbc:secret-stack, using the org name rather than "ssb", but I'm really not sure what the best practices are. I think there's an optimal middle ground between DEBUG=secret-stack and DEBUG=* but I'm unopinionated between ssb and ssbc.

dominictarr commented 6 years ago

@regular for debug I'm keen. I've also been having a plugin specific logging config. ebt.logging tunnel.logging. Very helpful to disable the thing you are not currently debugging.

are there proposed changes in the transport plugins that this relates to? I am worried about people having to read code just to figure out how to configure their network. (really, just want them to press enter and it works)

dominictarr commented 6 years ago

hmm, this would depend on https://github.com/ssbc/ssb-config/pull/23 to work correctly wouldn't?