The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/2405

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Relates to #1928.

Adapt log levels and add complimentary start/stop logging if missing.
From 397cef5deb76d0f4def4dec4a62788abe418a59f Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brau...@canonical.com>
Date: Tue, 20 Sep 2016 09:48:03 +0200
Subject: [PATCH 1/2] lxd/daemon: adapt log levels

Signed-off-by: Christian Brauner <christian.brau...@canonical.com>
---
 lxd/daemon.go | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/lxd/daemon.go b/lxd/daemon.go
index bd3e677..9c6c4a5 100644
--- a/lxd/daemon.go
+++ b/lxd/daemon.go
@@ -772,7 +772,7 @@ func (d *Daemon) Init() error {
        go func() {
                t := time.NewTicker(24 * time.Hour)
                for {
-                       shared.LogDebugf("Expiring log files")
+                       shared.LogInfof("Expiring log files")
 
                        err := d.ExpireLogs()
                        if err != nil {
@@ -792,6 +792,7 @@ func (d *Daemon) Init() error {
        )
 
        /* Setup /dev/lxd */
+       shared.LogInfof("Starting /dev/lxd handler")
        d.devlxd, err = createAndBindDevLxd()
        if err != nil {
                return err
@@ -1094,18 +1095,21 @@ func (d *Daemon) Stop() error {
        }
 
        if n, err := d.numRunningContainers(); err != nil || n == 0 {
-               shared.LogDebugf("Unmounting shmounts")
+               shared.LogInfof("Unmounting shmounts")
 
                syscall.Unmount(shared.VarPath("shmounts"), syscall.MNT_DETACH)
+
+               shared.LogInfof("Done unmounting shmounts")
        } else {
                shared.LogDebugf("Not unmounting shmounts (containers are still 
running)")
        }
 
-       shared.LogDebugf("Closing the database")
+       shared.LogInfof("Closing the database")
        d.db.Close()
 
-       shared.LogDebugf("Stopping /dev/lxd handler")
+       shared.LogInfof("Stopping /dev/lxd handler")
        d.devlxd.Close()
+       shared.LogInfof("Stopped /dev/lxd handler")
 
        if d.MockMode || forceStop {
                return nil

From d09e62c351e0db26b5888528625663af0a8ce8f3 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brau...@canonical.com>
Date: Tue, 20 Sep 2016 09:54:41 +0200
Subject: [PATCH 2/2] lxd/images: adapt log levels

Signed-off-by: Christian Brauner <christian.brau...@canonical.com>
---
 lxd/images.go | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lxd/images.go b/lxd/images.go
index 4486165..3f43e20 100644
--- a/lxd/images.go
+++ b/lxd/images.go
@@ -853,7 +853,7 @@ func imagesGet(d *Daemon, r *http.Request) Response {
 var imagesCmd = Command{name: "images", post: imagesPost, untrustedGet: true, 
get: imagesGet}
 
 func autoUpdateImages(d *Daemon) {
-       shared.LogDebugf("Updating images")
+       shared.LogInfof("Updating images")
 
        images, err := dbImagesGet(d.db, false)
        if err != nil {
@@ -912,11 +912,11 @@ func autoUpdateImages(d *Daemon) {
                }
        }
 
-       shared.LogDebugf("Done updating images")
+       shared.LogInfof("Done updating images")
 }
 
 func pruneExpiredImages(d *Daemon) {
-       shared.LogDebugf("Pruning expired images")
+       shared.LogInfof("Pruning expired images")
 
        // Get the list of expires images
        expiry := daemonConfig["images.remote_cache_expiry"].GetInt64()
@@ -933,7 +933,7 @@ func pruneExpiredImages(d *Daemon) {
                }
        }
 
-       shared.LogDebugf("Done pruning expired images")
+       shared.LogInfof("Done pruning expired images")
 }
 
 func doDeleteImage(d *Daemon, fingerprint string) error {
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to