Added verbose output #52

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
5 participants

Hi there,

I got rid of the version message when -v is passed and now that enables verbose output, where incoming messages and other info will be passed into stdout. I saw this in the TODO doc and thought I'd chip in.

It's been a very long time since I've done any C so you'll have to forgive me... my skills are a little rusty.

Thanks,

Jamie

Removed the version flag and replaced -v with verbosity. beanstalkd w…
…ill now output incoming messages and other info to stdout if -v is passed
Owner

kr commented Dec 7, 2010

Thanks for the contribution! Before I can merge this in, there are just a couple of problems to address:

  • We can't get rid of (or change) the existing -v flag,
    but we can add a new one. I'd suggest -V (capital)
    for verbose.
  • This patch actually does two things: it adds a flag,
    and it adds log messages. Ideally is should be broken
    up into two (or more) commits. Let's just get the flag
    in, then we can worry about the actual log messages
    separately.
  • This code won't compile as it stands -- you've changed
    the type of prot_init but haven't updated the call or the
    declaration in prot.h include the new parameter. Also,
    prot_init's verbose variable is an int*; it should probably
    be an int.
  • More fundamentally, the verbose variable ought to be
    shared bwtween files. I'd suggest putting the storage
    of that variable in util.c, and declaring it as extern in
    util.h See the declarations of progname for an example.
  • There's some noise. This change introduces unnecessary
    whitespace changes and it has unrelated change to
    host_addr in beanstalkd.c. If indeed host_addr ought to
    be initialized, that should go in a separate commit.

Hi,

Thanks for the feedback! Everything compiles are runs for me, which is very strange. But anyway, I've implemented your suggestions and moved verbose into a different flag (-V) and moved the declaration over to util.h.

As far as whitespace goes, that's just in there from debugging and testing and moving things about... I'm not particularly sure why people are bothered by this. I guess it's to keep commits clean, but anyway, I'm not really sure what I can do to rectify this. Can you pick specific changes from a changeset and merge into a new commit?

I'd really like to start contributing to more open source projects in different languages, so please bare with me, and I'll be properly on my feet soon.

Thanks again,

Jamie

AlekSi commented Mar 6, 2011

Any updates? Verbose mode would be very helpful.

halfdan commented Mar 9, 2011

+1 for this

Owner

kr commented Mar 30, 2011

I'm doing some serious refactoring right now.
I will try to merge this in as soon as that is done.

@ghost ghost assigned kr Apr 10, 2011

+1 for this. I'd test it myself but the code seems to have vanished. Did you delete this repo Jamie?

@kr kr closed this in d8cadfc Jan 16, 2012

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