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

Random debugging information being printed #328

Closed
jonhare opened this issue Jul 12, 2012 · 6 comments
Closed

Random debugging information being printed #328

jonhare opened this issue Jul 12, 2012 · 6 comments
Labels

Comments

@jonhare
Copy link

jonhare commented Jul 12, 2012

Both the native and java code contain a number of printf/println statements which were obviously designed for debugging. This is somewhat annoying when writing a command line program that uses Bridj as the output from Bridj gets mixed in with the output from the program.

It would be much better if Bridj used some kind of logging framework, or at least provided a way to turn off its output.

@ochafik
Copy link
Member

ochafik commented Jul 12, 2012

Hi @jonhare ,

Thanks for the excellent suggestion, it's high time the logging is rationalized indeed!

Cheers

@sarxos
Copy link
Contributor

sarxos commented Jul 12, 2012

+1

@ochafik
Copy link
Member

ochafik commented Jul 17, 2012

Hi @jonhare ,

I've started making logs less noisy + added a BRIDJ_QUIET=1 / -Dbridj.quiet=true switch to turn them off completely.
There's still one printf error log from native code for dlopen / LoadLibrary errors, but it shouldn't happen in normal circumstances and I'll try to remove it soon anyway.
Please let me know if you still see any parasite logs in the latest 0.6.2-SNAPSHOT or need further customization :-)

Cheers

@ochafik
Copy link
Member

ochafik commented Jul 17, 2012

(oh, and all logs now go through java.util.logging.Logger, so it should be possible to add file-based configuration and other regular logging magics / filters)

@sarxos
Copy link
Contributor

sarxos commented Jan 11, 2013

Hi,

There is a code in Demangler class which prints some info to stderr:

if (totalArgs != parameterTypes.length) {
  System.err.println("Not enough args for " + this);
  return false;
}

Is it possible to enhance it to support -Dbridj.quiet=true property, and/or pass it to log LOG.error("message here") ??

@ochafik
Copy link
Member

ochafik commented Jun 9, 2013

Closing now, please let me know if it needs to be reopened

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

No branches or pull requests

3 participants