diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..da8c4c4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +slogging.egg-info/ +*.py[co] +doc/build/* +dist +.coverage \ No newline at end of file diff --git a/bin/swift-account-stats-logger b/bin/swift-account-stats-logger index b018ab5..dd4e49d 100755 --- a/bin/swift-account-stats-logger +++ b/bin/swift-account-stats-logger @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from swift.stats.db_stats_collector import AccountStatsCollector +from slogging.db_stats_collector import AccountStatsCollector from swift.common.utils import parse_options from swift.common.daemon import run_daemon diff --git a/bin/swift-container-stats-logger b/bin/swift-container-stats-logger index 3b93c20..689b9cc 100755 --- a/bin/swift-container-stats-logger +++ b/bin/swift-container-stats-logger @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from swift.stats.db_stats_collector import ContainerStatsCollector +from slogging.db_stats_collector import ContainerStatsCollector from swift.common.utils import parse_options from swift.common.daemon import run_daemon diff --git a/bin/swift-log-stats-collector b/bin/swift-log-stats-collector index f2d5011..6e0fb67 100755 --- a/bin/swift-log-stats-collector +++ b/bin/swift-log-stats-collector @@ -16,7 +16,7 @@ from optparse import OptionParser -from swift.stats.log_processor import LogProcessorDaemon +from slogging.log_processor import LogProcessorDaemon from swift.common.utils import parse_options from swift.common.daemon import run_daemon diff --git a/bin/swift-log-uploader b/bin/swift-log-uploader index 3639dff..b2b38f1 100755 --- a/bin/swift-log-uploader +++ b/bin/swift-log-uploader @@ -16,7 +16,7 @@ import sys from optparse import OptionParser -from swift.stats.log_uploader import LogUploader +from slogging.log_uploader import LogUploader from swift.common.utils import parse_options from swift.common import utils diff --git a/etc/account-server.conf-sample b/etc/account-server.conf-sample deleted file mode 100644 index 1fac948..0000000 --- a/etc/account-server.conf-sample +++ /dev/null @@ -1,78 +0,0 @@ -[DEFAULT] -# bind_ip = 0.0.0.0 -# bind_port = 6002 -# backlog = 4096 -# workers = 1 -# user = swift -# swift_dir = /etc/swift -# devices = /srv/node -# mount_check = true -# You can specify default log routing here if you want: -# log_name = swift -# log_facility = LOG_LOCAL0 -# log_level = INFO - -[pipeline:main] -pipeline = account-server - -[app:account-server] -use = egg:swift#account -# You can override the default log routing for this app here: -# set log_name = account-server -# set log_facility = LOG_LOCAL0 -# set log_level = INFO -# set log_requests = True - -[account-replicator] -# You can override the default log routing for this app here (don't use set!): -# log_name = account-replicator -# log_facility = LOG_LOCAL0 -# log_level = INFO -# vm_test_mode = no -# log_facility = LOG_LOCAL0 -# log_level = INFO -# per_diff = 1000 -# concurrency = 8 -# run_pause = 30 -# How long without an error before a node's error count is reset. This will -# also be how long before a node is reenabled after suppression is triggered. -# error_suppression_interval = 60 -# How many errors can accumulate before a node is temporarily ignored. -# error_suppression_limit = 10 -# node_timeout = 10 -# conn_timeout = 0.5 -# The replicator also performs reclamation -# reclaim_age = 86400 - -[account-stats] -# You can override the default log routing for this app here (don't use set!): -# log_name = account-stats -# log_facility = LOG_LOCAL0 -# log_level = INFO -# cf_account = AUTH_7abbc116-8a07-4b63-819d-02715d3e0f31 -# container_name = account_stats -# proxy_server_conf = /etc/swift/proxy-server.conf -# log_facility = LOG_LOCAL0 -# log_level = INFO - -[account-auditor] -# You can override the default log routing for this app here (don't use set!): -# log_name = account-auditor -# log_facility = LOG_LOCAL0 -# log_level = INFO -# Will audit, at most, 1 account per device per interval -# interval = 1800 -# log_facility = LOG_LOCAL0 -# log_level = INFO - -[account-reaper] -# You can override the default log routing for this app here (don't use set!): -# log_name = account-reaper -# log_facility = LOG_LOCAL0 -# log_level = INFO -# concurrency = 25 -# interval = 3600 -# node_timeout = 10 -# conn_timeout = 0.5 -# log_facility = LOG_LOCAL0 -# log_level = INFO diff --git a/etc/log-processor.conf-sample b/etc/log-processor.conf-sample index 350ae73..1b25689 100644 --- a/etc/log-processor.conf-sample +++ b/etc/log-processor.conf-sample @@ -38,7 +38,7 @@ swift_account = AUTH_7abbc116-8a07-4b63-819d-02715d3e0f31 container_name = account_stats # new_log_cutoff = 7200 # unlink_log = True -class_path = swift.stats.stats_processor.StatsLogProcessor +class_path = slogging.stats_processor.StatsLogProcessor # devices = /srv/node # mount_check = true # user = swift @@ -49,7 +49,7 @@ swift_account = AUTH_7abbc116-8a07-4b63-819d-02715d3e0f31 container_name = container_stats # new_log_cutoff = 7200 # unlink_log = True -class_path = swift.stats.stats_processor.StatsLogProcessor +class_path = slogging.stats_processor.StatsLogProcessor processable = false # devices = /srv/node # mount_check = true diff --git a/slogging/log_processor.py b/slogging/log_processor.py index 36c39eb..dd13d56 100644 --- a/slogging/log_processor.py +++ b/slogging/log_processor.py @@ -25,7 +25,7 @@ import Queue import cPickle import hashlib -from sloging.internal_proxy import InternalProxy +from slogging.internal_proxy import InternalProxy from swift.common.exceptions import ChunkReadTimeout from swift.common.utils import get_logger, readconf, TRUE_VALUES from swift.common.daemon import Daemon