Patch Proposal: Syslog

40 views
Skip to first unread message

Exiquio Cooper-Anderson

unread,
Jun 26, 2013, 4:42:55 PM6/26/13
to golia...@googlegroups.com
Hello folks. I'm a software developer working on internal products with my team at Rackspace. We are implementing a few projects using Goliath. We would like to be able to have the Goliath server to log via syslog and as such we are proposing to implement a patch to runner.rb (https://github.com/exiquio/goliath/blob/master/lib/goliath/runner.rb). Our intention is to piggy back what is already being done with log4r by adding complementary methods for setting up and adding a syslog logger based up the likes of #setup_file_logger && #setup_stdout_logger. In the cause of avoiding wasted effort such as (my favorite) reinventing the wheel and pursuing vanity, we are contacting this user group to see what y'all think. If this is an acceptable idea we will write and test the patch in the very near future and get out a pull request immediately after. Please let me know what y'all think and I will be sure to communicate it to my development team.

--
Exiquio

exiquio.cooper-ander 
[at]


dan sinclair

unread,
Jun 26, 2013, 4:51:46 PM6/26/13
to golia...@googlegroups.com
I believe you should be able to do what you want currently, you just need a custom runner. If you take a look inside the examples directory there is a custom_server.rb. You can add a

runner.logger = MyFancyLogger 

before the call to runner.run. If goliath sees that logger is populated before it calls setup_logger it will skip the creation of the log4r logger.

Does that work for you?

dan






--
You received this message because you are subscribed to the Google Groups "Goliath.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to goliath-io+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Exiquio Cooper-Anderson

unread,
Jun 28, 2013, 11:24:05 AM6/28/13
to golia...@googlegroups.com
Yes, that works although I had to pull from the master as opposed to the the latest gem. This required beta software as a dependency  Should this work with the latest gem? Either way, thanks a lot.

dan sinclair

unread,
Jun 28, 2013, 11:35:26 AM6/28/13
to golia...@googlegroups.com
Oh, didn't realize it wasn't in a release yet. Maybe we can poke igrigorik@ into doing a new release.

dan

Ilya Grigorik

unread,
Jun 28, 2013, 7:16:25 PM6/28/13
to golia...@googlegroups.com
Poke indeed. :)

https://github.com/postrank-labs/goliath/issues/250 - if nobody pipes up, I'll push it out.

ig

Exiquio Cooper-Anderson

unread,
Jul 1, 2013, 9:50:28 AM7/1/13
to golia...@googlegroups.com
Thanks a lot folks! Pardon my ignorance.
Reply all
Reply to author
Forward
0 new messages