logging system, syslog and abstraction improvements

This is a WIP, this is a little roadmad and some questions I have.

- [x] Create `server.Logger` interface and add `server.SetLogger` method
- [x] Modify all the actual call to the new format
- [x] Network syslog
- [ ] `gnatsd` options and link Network syslog
- [x] fix this race condition on `server.SetLogger()`
- [x] Tests

Questions:
- Is really needed the [`alreadyFormatted`](https://github.com/apcera/gnatsd/blob/master/server/log.go#L57
) function? We can control this in the codebase
- Some [options like LogFile, FidFile](https://github.com/apcera/gnatsd/blob/master/server/opts.go#L45) are related more to the daemon than the Server class, we can move away? and keep it at the gnatsd.go?

Related to: https://github.com/apcera/gnatsd/issues/7

Trace is system wide, why attach it per client?



On Oct 10, 2014, at 2:12 PM, Cameron Walters (cee-dub) <
notifications@github.com> wrote:

In server/client.go:

> @@ -314,7 +327,7 @@ func (c *client) processPong() {
>  }
>
>  func (c *client) processMsgArgs(arg []byte) error {
> -	if trace > 0 {
> +	if c.trace == true {

comparing bool to true is redundant. Here and a few more below.

—
Reply to this email directly or view it on GitHub
<https://github.com/apcera/gnatsd/pull/54/files#r18731198>.