memlogd/logwrite: use the same naming convention as init

In e8786d73bb the logwrite package will
automatically append .log to every log.

In 5201049f2c the init package will send
stderr of a service `s` to a log named `s` and the stdout to `s.out`.
Therefore the files we create on disk are `s.log` and `s.out.log`.

This patch modifies the memlogd `logwrite` command-line wrapper to use
the same convention.

Note there is a confusing name clash between `pkg/logwrite` and `cmd/logwrite`
in `memlogd` modified here.

Signed-off-by: David Scott <dave.scott@docker.com>
This commit is contained in:
David Scott 2018-07-20 15:31:29 +01:00
parent 5d7c1b215a
commit ddee5f27f3

View File

@ -70,11 +70,11 @@ func main() {
raddr := net.UnixAddr{Name: serverSocket, Net: "unixgram"}
if err = sendFD(conn, &raddr, name+".stdout", remoteStdoutFd); err != nil {
if err = sendFD(conn, &raddr, name+".out", remoteStdoutFd); err != nil {
log.Fatal("fd stdout send failed: ", err)
}
if err = sendFD(conn, &raddr, name+".stderr", remoteStderrFd); err != nil {
if err = sendFD(conn, &raddr, name, remoteStderrFd); err != nil {
log.Fatal("fd stderr send failed: ", err)
}