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

Instead of fprintf, C extension should use a Ruby logger #12

Open
rtyler opened this issue Aug 30, 2014 · 1 comment
Open

Instead of fprintf, C extension should use a Ruby logger #12

rtyler opened this issue Aug 30, 2014 · 1 comment

Comments

@rtyler
Copy link
Member

rtyler commented Aug 30, 2014

Right now hermann_lib.c has a number of calls to fprintf to record information/logging info to stderr. It really should send that information to a Ruby logger.

@rtyler rtyler modified the milestone: 0.14 Sep 2, 2014
@rtyler
Copy link
Member Author

rtyler commented Sep 2, 2014

I think this should be fairly straightforward to accomplish if the constructor receives Ruby logger object

VALUE logger;

/* get the :debug symbol for dispatch */
ID debug_sym = rb_intern("debug");

/* dispatch to logger#debug with "LOGGING!" as the String */
VALUE result = rb_funcall(logger, debug_sym, 1, rb_str_new2("LOGGING!"));

@rtyler rtyler self-assigned this Sep 2, 2014
@stancampbell3 stancampbell3 assigned stancampbell3 and unassigned rtyler Sep 3, 2014
@rtyler rtyler modified the milestone: 0.14 Sep 4, 2014
@rtyler rtyler assigned rtyler and unassigned stancampbell3 Sep 15, 2014
@rtyler rtyler modified the milestone: 0.17 Sep 15, 2014
@rtyler rtyler added the MRI label Oct 7, 2014
@rtyler rtyler modified the milestone: 0.17 Oct 10, 2014
@rtyler rtyler modified the milestone: 1.0 - API stabilization Sep 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants