Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ server {
# proxy and log all CC traffic
location / {
access_log /tmp/nginx-access.log main;
access_log syslog:server=127.0.0.1,severity=info,tag=vcap_nginx_access main;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ gem 'sequel_pg', require: 'sequel'
gem 'sinatra', '~> 4.2'
gem 'sinatra-contrib'
gem 'statsd-ruby', '~> 1.5.0'
gem 'syslog'
gem 'talentbox-delayed_job_sequel', '~> 4.4.0'
gem 'uri', '~> 1.1'
gem 'vmstat', '~> 2.3'
Expand Down
3 changes: 0 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,6 @@ GEM
spring (>= 0.9.1)
statsd-ruby (1.5.0)
stringio (3.2.0)
syslog (0.4.0)
logger
talentbox-delayed_job_sequel (4.4.0)
delayed_job (~> 4.1)
sequel (>= 5.0, < 6.0)
Expand Down Expand Up @@ -681,7 +679,6 @@ DEPENDENCIES
spring
spring-commands-rspec
statsd-ruby (~> 1.5.0)
syslog
talentbox-delayed_job_sequel (~> 4.4.0)
timecop
uri (~> 1.1)
Expand Down
1 change: 0 additions & 1 deletion config/cloud_controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ nginx:
logging:
file: /tmp/cloud_controller.log
level: debug2
syslog: vcap.example
anonymize_ips: false
format:
timestamp: 'rfc3339'
Expand Down
1 change: 0 additions & 1 deletion lib/cloud_controller/config_schemas/api_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ class ApiSchema < VCAP::Config
logging: {
level: String, # debug, info, etc.
file: String, # Log file to use
syslog: String, # Name to associate with syslog messages (should start with 'vcap.')
optional(:stdout_sink_enabled) => bool,
optional(:anonymize_ips) => bool,
optional(:format) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class BlobstoreBenchmarksSchema < VCAP::Config
optional(:logging) => {
optional(:level) => String,
optional(:file) => String,
optional(:syslog) => String,
optional(:stdout_sink_enabled) => bool
},

Expand Down
3 changes: 1 addition & 2 deletions lib/cloud_controller/config_schemas/clock_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ class ClockSchema < VCAP::Config

logging: {
level: String, # debug, info, etc.
file: String, # Log file to use
syslog: String # Name to associate with syslog messages (should start with 'vcap.')
file: String # Log file to use
},

pid_filename: String, # Pid filename to use
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ class DeploymentUpdaterSchema < VCAP::Config

logging: {
level: String, # debug, info, etc.
file: String, # Log file to use
syslog: String # Name to associate with syslog messages (should start with 'vcap.')
file: String # Log file to use
},

pid_filename: String, # Pid filename to use
Expand Down
1 change: 0 additions & 1 deletion lib/cloud_controller/config_schemas/migrate_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class MigrateSchema < VCAP::Config
logging: {
level: String, # debug, info, etc.
file: String, # Log file to use
syslog: String, # Name to associate with syslog messages (should start with 'vcap.')
optional(:stdout_sink_enabled) => bool
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class RotateDatabaseKeySchema < VCAP::Config
logging: {
level: String, # debug, info, etc.
file: String, # Log file to use
syslog: String, # Name to associate with syslog messages (should start with 'vcap.')
stdout_sink_enabled: bool
},

Expand Down
3 changes: 1 addition & 2 deletions lib/cloud_controller/config_schemas/route_syncer_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ class RouteSyncerSchema < VCAP::Config
{
logging: {
level: String, # debug, info, etc.
file: String, # Log file to use
syslog: String # Name to associate with syslog messages (should start with 'vcap.')
file: String # Log file to use
},

pid_filename: String, # Pid filename to use
Expand Down
3 changes: 1 addition & 2 deletions lib/cloud_controller/config_schemas/worker_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ class WorkerSchema < VCAP::Config

logging: {
level: String, # debug, info, etc.
file: String, # Log file to use
syslog: String # Name to associate with syslog messages (should start with 'vcap.')
file: String # Log file to use
},

log_audit_events: bool,
Expand Down
1 change: 0 additions & 1 deletion lib/cloud_controller/rack_app_builder.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require 'syslog/logger'
require 'vcap_request_context_setter'
require 'cors'
require 'request_metrics'
Expand Down
6 changes: 0 additions & 6 deletions lib/steno/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class << self
# logging:
# level: <info, debug, etc>
# file: </path/to/logfile>
# syslog: <syslog name>
#
# @param [String] path Path to yaml config
# @param [Hash] overrides
Expand Down Expand Up @@ -48,11 +47,6 @@ def to_config_hash(hash)
opts[:sinks] << Steno::Sink::IO.for_file(hash[:file], max_retries:)
end

if hash[:syslog]
Steno::Sink::Syslog.instance.open(hash[:syslog])
opts[:sinks] << Steno::Sink::Syslog.instance
end

opts[:sinks] << Steno::Sink::IO.new($stdout) if opts[:sinks].empty?

opts
Expand Down
1 change: 0 additions & 1 deletion lib/steno/sink.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require 'steno/sink/base'
require 'steno/sink/io'
require 'steno/sink/syslog'
require 'steno/sink/counter'
72 changes: 0 additions & 72 deletions lib/steno/sink/syslog.rb

This file was deleted.

16 changes: 0 additions & 16 deletions spec/isolated_specs/steno/spec_helper.rb

This file was deleted.

25 changes: 2 additions & 23 deletions spec/isolated_specs/steno/unit/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@
expect(Steno::Sink::IO).to receive(:for_file).with(@log_path,
max_retries: 5).
and_return(@mock_sink_file)

@mock_sink_syslog = double('sink')
expect(@mock_sink_syslog).to receive(:codec=)
expect(@mock_sink_syslog).to receive(:open).with('test')
expect(Steno::Sink::Syslog).to receive(:instance).twice.
and_return(@mock_sink_syslog)
end

after do
Expand All @@ -28,16 +22,15 @@
expect(@config.context.class).to eq(Steno::Context::Null)
expect(@config.codec.class).to eq(Steno::Codec::Json)

expect(@config.sinks.size).to eq(2)
expect(@config.sinks).to contain_exactly(@mock_sink_file, @mock_sink_syslog)
expect(@config.sinks.size).to eq(1)
expect(@config.sinks).to contain_exactly(@mock_sink_file)
end

it 'works for symbolized keys' do
@hash = {
file: @log_path,
level: 'debug2',
default_log_level: 'warn',
syslog: 'test',
max_retries: 5
}
end
Expand All @@ -47,7 +40,6 @@
'file' => @log_path,
'level' => 'debug2',
'default_log_level' => 'warn',
'syslog' => 'test',
'max_retries' => 5
}
end
Expand Down Expand Up @@ -113,19 +105,6 @@
expect(config.sinks[0]).to eq(mock_sink)
end

it "adds a syslog sink if the 'syslog' key is specified" do
write_config(@config_path, { 'syslog' => 'test' })
mock_sink = double('sink')
expect(mock_sink).to receive(:open).with('test')
expect(mock_sink).to receive(:codec=)

expect(Steno::Sink::Syslog).to receive(:instance).twice.and_return(mock_sink)

config = described_class.from_file(@config_path)
expect(config.sinks.size).to eq(1)
expect(config.sinks[0]).to eq(mock_sink)
end

it 'adds an io sink to stdout if no sinks are explicitly specified in the config file' do
write_config(@config_path, {})
mock_sink = double('sink')
Expand Down
94 changes: 0 additions & 94 deletions spec/isolated_specs/steno/unit/sink/syslog_spec.rb

This file was deleted.

Loading
Loading