Skip to content

Commit

Permalink
Merge pull request #1 from DataDog/tonycthsu/daemon
Browse files Browse the repository at this point in the history
Add `daemon` option
  • Loading branch information
lloeki authored Oct 22, 2024
2 parents 1d1ffc2 + 2f5826f commit bab0bc1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bin/catadog
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ module Datadog
Logger: logger,
AccessLog: [[logger.instance_variable_get(:@logdev).dev, WEBrick::AccessLog::COMBINED_LOG_FORMAT]],
BindAddress: settings.host.to_s,
Port: settings.port
Port: settings.port,
ServerType: settings.daemon ? WEBrick::Daemon : WEBrick::SimpleServer
# RequestCallback: request_callback
}
end
Expand All @@ -366,7 +367,8 @@ module Datadog
:record_dir,
:silent,
:log,
:mocks
:mocks,
:daemon

def initialize
@debug = false
Expand All @@ -378,6 +380,7 @@ module Datadog
@agent_port = 8126
@record_dir = nil
@silent = false
@daemon = false
@log = $stderr
@mocks = []
end
Expand All @@ -402,6 +405,8 @@ module Datadog
case arg
when "-d", "--debug"
settings.debug = true
when "--daemon"
settings.daemon = true
when "-s", "--silent"
settings.silent = true
when "-v", "--verbose"
Expand Down

0 comments on commit bab0bc1

Please sign in to comment.