cockroach icon indicating copy to clipboard operation
cockroach copied to clipboard

cli: Startup message gets double-printed when logging to stderr

Open a-robinson opened this issue 9 years ago • 4 comments

This is pretty minor, but when you're printing your server's logs to stderr, the node startup message now gets printed twice in a row, which looks a little funny:

...
I170315 11:17:43.962700 15 server/server.go:825  [n1] serving sql connections
I170315 11:17:43.962803 15 cli/start.go:430  Startup message:
CockroachDB node starting at 2017-03-15 11:17:43.962734079 -0400 EDT
build:      CCL 4a880d598 @ 2017/03/15 15:15:54 (go1.8)
admin:      http://localhost:8080
sql:        postgresql://root@localhost:26257?sslmode=disable
logs:       cockroach-data/logs
store[0]:   path=cockroach-data
status:     initialized new cluster
clusterID:  46e8d59d-d545-4c56-809b-8a2f423b77eb
nodeID:     1
CockroachDB node starting at 2017-03-15 11:17:43.962734079 -0400 EDT
build:      CCL 4a880d598 @ 2017/03/15 15:15:54 (go1.8)
admin:      http://localhost:8080
sql:        postgresql://root@localhost:26257?sslmode=disable
logs:       cockroach-data/logs
store[0]:   path=cockroach-data
status:     initialized new cluster
clusterID:  46e8d59d-d545-4c56-809b-8a2f423b77eb
nodeID:     1
I170315 11:17:43.963107 116 storage/split_queue.go:98  [split,n1,s1,r5/1:/{Table/13-Max},@c4207ee000] splitting at key /Table/14/0
...

Introduced by #13927. We could potentially check the settings and only write it out to both the log and to stdout if logging to stderr isn't enabled, or we could just ignore this since it's not a big deal.

a-robinson avatar Mar 15 '17 15:03 a-robinson

@a-robinson I'd like to take this on as my first contribution to the project :)

aschlesener avatar Apr 10 '17 23:04 aschlesener

That's great, @aschlesener! Consider it yours, and let me know if there's anything I can do to help!

a-robinson avatar Apr 11 '17 13:04 a-robinson

has this issue been done ?

yangliang9004 avatar May 03 '17 11:05 yangliang9004

Thanks for asking, @yangliang9004. @knz actually fixed this yesterday in #15597 but forgot to close the issue. Closing it now.

Let me know if you'd like help finding something else to work on!

a-robinson avatar May 03 '17 15:05 a-robinson