coreos/etcd — pull request #420 by benbjohnson (2013-12-27 22:51:54+00:00)
Title: Logging

This pull request is a combination of logging integration and fixing the go-raft integration. Unfortunately, it wasn't easy to separate out the two. The last go-raft update in etcd was a while ago so there were several issues that had to be debugged and fixed.

Everything seems to be working smoothly for me now. I wanted to wait until after v0.2.0 was released before getting this pushed in. @xiangli-cmu: can you do some testing on this to make sure it works well from the Raft side?

The logging captures and logs the following events dispatched from the Raft server:

```
State Change:
[etcd] Jan 01 00:00:00.000 INFO | node1: state changed from 'follower' to 'candidate'
```

```
Leader Change:
[etcd] Jan 01 00:00:00.000 INFO | node1: leader changed from 'node2' to 'node3'.
```

```
Term Change:
[etcd] Jan 01 00:00:00.000 INFO | node1: term #1 started.
```

```
Add Peer:
[etcd] Jan 01 00:00:00.000 INFO | node1: peer added: node2
```

```
Remove Peer:
[etcd] Jan 01 00:00:00.000 INFO | node1: peer removed: node2
```

There are some other items on the Trello card but I wanted to get this push in and tested since it includes Raft integration and fixes.

Trello: https://trello.com/c/gxU8D98k

/cc: @philips