Git Product home page Git Product logo

Comments (3)

dekellum avatar dekellum commented on July 18, 2024

Part of the confusion in this environment is over differing opinions on where to draw the line between java-way and ruby-way. I've generally sided on the ruby side for the configuration topic, but for logging in particular I've tried to keep it flexible enough to support all SLF4J output adaptors and config options.

custom launcher

You mention writing your own start script. I encourage that and typically do the same. This allows you total control of all details. I've packaged several complete sinatra apps as gems with fishwife and rjack-logback as dependencies. One public example is: https://github.com/dekellum/boxed-geminabox

In particular: https://github.com/dekellum/boxed-geminabox/blob/master/init/boxed-geminabox

  • Hashdot headers for daemonizing, log redirection, and integration with Iyyov process monitor (Might explain why I am less interested in Mizuno's later attempts at process control.)
  • Logback custom configuration specific to the daemon/production mode.
  • Using Hooker to externalize a minimal set of application and deployment-specific configuration (see also config/config.rb sample in same repo)

fishwife launcher

In general fishwife or rackup make good quick demonstration launchers, or for config.ru compatibility with other servers. The intent with fishwife is to bring up a basic but functioning log output. If you want logback as the output adaptor, why not gem install rjack-logback or include via bundler? Then, if you really want to use a logback.xml instead of ruby based config, you can do the following in your config.ru:

RJack::Logback.configure do
  RJack::Logback.load_xml_config( 'sample-logback.xml' )
end

rackup launcher

See fishwife/example/config.ru for an example that works with rackup. When using rackup [-s Fishwife], no SLF4J output adaptor is loaded at all. You can arrange for any of these yourself.

Finally, see the logging section of the fishwife/README. Might consider this thread source material to be later integrated in the README which definitely has room for improvement.

from fishwife.

jillesvangurp avatar jillesvangurp commented on July 18, 2024

Thanks for the very detailed response. This is very helpful.

from fishwife.

dekellum avatar dekellum commented on July 18, 2024

Referenced in README given the useful question and notes here.

from fishwife.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.