containers / docker-lvm-plugin

Docker volume plugin for LVM volumes
GNU Lesser General Public License v3.0
155 stars 64 forks source link

log error messages to syslog to ease debugging #10

Closed shishir-a412ed closed 8 years ago

shishir-a412ed commented 8 years ago

Signed-off-by: Shishir Mahajan shishir.mahajan@redhat.com

shishir-a412ed commented 8 years ago

ping @runcom @rhatdan

runcom commented 8 years ago

fine to me, eventually we should send those logs to journald instead of stderr

shishir-a412ed commented 8 years ago

@runcom I checked these error messages using journalctl, and I was able to see them. E.g if I run docker volume create -d lvm --name foobar --opt size=2G where my volume_group size is 1G I can see an error message logged in my journalctl.

When I dojournalctl -u docker-lvm-plugin -f. I see my messages.

Anything else I need to take care of ?

Shishir

rhatdan commented 8 years ago

Those messages are coming from the docker-lvm-plugin.service unit file versus coming from the docker-lvm-plugin executable. Probably would be better to write to syslog handle it that way.

shishir-a412ed commented 8 years ago

@rhatdan So after logging to syslog, Can I still use journalctl to check my errors ?

Shishir

rhatdan commented 8 years ago

Yes journalctl catches all syslog messages.

shishir-a412ed commented 8 years ago

@rhatdan @runcom PTAL.

Shishir

rhatdan commented 8 years ago

Looks good, should we have logs.Info to tell when the tool does major changes to lvm?

shishir-a412ed commented 8 years ago

Sure I can add one. Merging this one. LGTM.