Method: CloudFiles::Container#log_retention=
- Defined in:
- lib/cloudfiles/container.rb
#log_retention=(value) ⇒ Object
Change the log retention status for this container. Values are true or false.
These logs will be periodically (at unpredictable intervals) compressed and uploaded to a “.CDN_ACCESS_LOGS” container in the form of “container_name.YYYYMMDDHH-XXXX.gz”.
176 177 178 179 180 181 182 183 184 |
# File 'lib/cloudfiles/container.rb', line 176 def log_retention=(value) raise Exception::CDNNotAvailable unless cdn_available? begin SwiftClient.post_container(self.connection.cdnurl, self.connection.authtoken, escaped_name, {"x-log-retention" => value.to_s.capitalize}) true rescue ClientException => e raise CloudFiles::Exception::InvalidResponse, "Invalid response code #{e.status}" unless (e.status.to_s == "201" or e.status.to_s == "202") end end |