diff --git a/rackspace/lb/v1/lbs/fixtures.go b/rackspace/lb/v1/lbs/fixtures.go
index 4c497e4..db6545a 100644
--- a/rackspace/lb/v1/lbs/fixtures.go
+++ b/rackspace/lb/v1/lbs/fixtures.go
@@ -378,3 +378,55 @@
 			`)
 	})
 }
+
+func mockGetLoggingResponse(t *testing.T, id int) {
+	th.Mux.HandleFunc("/loadbalancers/"+strconv.Itoa(id)+"/connectionlogging", func(w http.ResponseWriter, r *http.Request) {
+		th.TestMethod(t, r, "GET")
+		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
+
+		w.Header().Add("Content-Type", "application/json")
+		w.WriteHeader(http.StatusOK)
+
+		fmt.Fprintf(w, `
+{
+  "connectionLogging": {
+    "enabled": true
+  }
+}
+			`)
+	})
+}
+
+func mockEnableLoggingResponse(t *testing.T, id int) {
+	th.Mux.HandleFunc("/loadbalancers/"+strconv.Itoa(id)+"/connectionlogging", func(w http.ResponseWriter, r *http.Request) {
+		th.TestMethod(t, r, "PUT")
+		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
+
+		th.TestJSONRequest(t, r, `
+{
+   "connectionLogging":{
+      "enabled":true
+   }
+}
+		`)
+
+		w.WriteHeader(http.StatusOK)
+	})
+}
+
+func mockDisableLoggingResponse(t *testing.T, id int) {
+	th.Mux.HandleFunc("/loadbalancers/"+strconv.Itoa(id)+"/connectionlogging", func(w http.ResponseWriter, r *http.Request) {
+		th.TestMethod(t, r, "PUT")
+		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
+
+		th.TestJSONRequest(t, r, `
+{
+	"connectionLogging":{
+			"enabled":false
+	}
+}
+		`)
+
+		w.WriteHeader(http.StatusOK)
+	})
+}
diff --git a/rackspace/lb/v1/lbs/requests.go b/rackspace/lb/v1/lbs/requests.go
index a26e8ce..81431b0 100644
--- a/rackspace/lb/v1/lbs/requests.go
+++ b/rackspace/lb/v1/lbs/requests.go
@@ -3,6 +3,7 @@
 import (
 	"errors"
 
+	"github.com/mitchellh/mapstructure"
 	"github.com/racker/perigee"
 
 	"github.com/rackspace/gophercloud"
@@ -393,3 +394,61 @@
 		return AlgorithmPage{pagination.SinglePageBase(r)}
 	})
 }
+
+// IsLoggingEnabled returns true if the load balancer has connection logging
+// enabled and false if not.
+func IsLoggingEnabled(client *gophercloud.ServiceClient, id int) (bool, error) {
+	var body interface{}
+
+	_, err := perigee.Request("GET", loggingURL(client, id), perigee.Options{
+		MoreHeaders: client.AuthenticatedHeaders(),
+		Results:     &body,
+		OkCodes:     []int{200},
+	})
+	if err != nil {
+		return false, err
+	}
+
+	var resp struct {
+		CL struct {
+			Enabled bool `mapstructure:"enabled"`
+		} `mapstructure:"connectionLogging"`
+	}
+
+	err = mapstructure.Decode(body, &resp)
+	return resp.CL.Enabled, err
+}
+
+func toConnLoggingMap(state bool) map[string]map[string]bool {
+	return map[string]map[string]bool{
+		"connectionLogging": map[string]bool{"enabled": false},
+	}
+}
+
+// EnableLogging will enable connection logging for a specified load balancer.
+func EnableLogging(client *gophercloud.ServiceClient, id int) gophercloud.ErrResult {
+	reqBody := toConnLoggingMap(true)
+	var res gophercloud.ErrResult
+
+	_, res.Err = perigee.Request("GET", loggingURL(client, id), perigee.Options{
+		MoreHeaders: client.AuthenticatedHeaders(),
+		ReqBody:     &reqBody,
+		OkCodes:     []int{200},
+	})
+
+	return res
+}
+
+// DisableLogging will disable connection logging for a specified load balancer.
+func DisableLogging(client *gophercloud.ServiceClient, id int) gophercloud.ErrResult {
+	reqBody := toConnLoggingMap(false)
+	var res gophercloud.ErrResult
+
+	_, res.Err = perigee.Request("GET", loggingURL(client, id), perigee.Options{
+		MoreHeaders: client.AuthenticatedHeaders(),
+		ReqBody:     &reqBody,
+		OkCodes:     []int{200},
+	})
+
+	return res
+}
diff --git a/rackspace/lb/v1/lbs/requests_test.go b/rackspace/lb/v1/lbs/requests_test.go
index fd50883..35ccfd7 100644
--- a/rackspace/lb/v1/lbs/requests_test.go
+++ b/rackspace/lb/v1/lbs/requests_test.go
@@ -286,3 +286,14 @@
 	th.AssertNoErr(t, err)
 	th.AssertEquals(t, 1, count)
 }
+
+func TestIsLoggingEnabled(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+
+	mockGetLoggingResponse(t, id1)
+
+	res, err := IsLoggingEnabled(client.ServiceClient(), id1)
+	th.AssertNoErr(t, err)
+	th.AssertEquals(t, true, res)
+}
diff --git a/rackspace/lb/v1/lbs/urls.go b/rackspace/lb/v1/lbs/urls.go
index 7b435b3..5100e94 100644
--- a/rackspace/lb/v1/lbs/urls.go
+++ b/rackspace/lb/v1/lbs/urls.go
@@ -10,6 +10,7 @@
 	path           = "loadbalancers"
 	protocolsPath  = "protocols"
 	algorithmsPath = "algorithms"
+	logPath        = "connectionlogging"
 )
 
 func resourceURL(c *gophercloud.ServiceClient, id int) string {
@@ -27,3 +28,7 @@
 func algorithmsURL(c *gophercloud.ServiceClient) string {
 	return c.ServiceURL(path, algorithmsPath)
 }
+
+func loggingURL(c *gophercloud.ServiceClient, id int) string {
+	return c.ServiceURL(path, strconv.Itoa(id), logPath)
+}
