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

tdiary serverコマンドにlogオプションを追加 #468

Merged
merged 4 commits into from
Jan 10, 2015

Conversation

machu
Copy link
Member

@machu machu commented Jan 1, 2015

#397 の対応です。標準のRackサーバをwebrickにし、logオプションを追加しました。未指定時はこれまで通りに標準出力に表示します。

@hsbt
Copy link
Member

hsbt commented Jan 2, 2015

その昔、特に何も考えないで rack サーバーなら thin と trinidad でしょうということで追加した部分なので、:server グループごと消してしまってよさそうです!

}
TDiary::Server.run( opts )
elsif
# --rack option
# Rack::Server reads ARGV as :config, so delete it
require 'webrick'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unicorn のような別の rack サーバーを使ってる時は不要だと思うので、それらがないときだけ webrick が使われるというコードだと良さそうです

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unicornで動かすときは、unicorn -> config.ru -> run TDiary::Application.new の順番で起動するため、このルートは通らないです。コマンドラインから tdiary server コマンドを起動したときだけ、 cli.rb 経由で webrick が起動します。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

なるほどなるほど。了解です。

hsbt added a commit that referenced this pull request Jan 10, 2015
tdiary serverコマンドにlogオプションを追加
@hsbt hsbt merged commit ea80bf7 into master Jan 10, 2015
@hsbt hsbt deleted the server-logging-option branch January 10, 2015 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants