confluentinc / ksql

The database purpose-built for stream processing applications.
https://ksqldb.io
Other
119 stars 1.04k forks source link

ksql-server log file should be in log.dir #1262

Open rmoff opened 6 years ago

rmoff commented 6 years ago

With ksql.log.dir set to /var/folders/q9/2tg_lt9j6nx29rvr5r5jn_bw0000gp/T/confluent.DiB0uT89/ksql-server/logs, not all log files are written to it, specifically ksql-server.stdout

Robin@asgard02 /p/v/f/q/2/T/c/ksql-server> ls -l /var/folders/q9/2tg_lt9j6nx29rvr5r5jn_bw0000gp/T/confluent.DiB0uT89/ksql-server/logs
total 40
-rw-r--r--  1 Robin  staff  18077  2 May 17:01 ksql-server-gc.log.0.current
Robin@asgard02 /p/v/f/q/2/T/c/ksql-server> ls -l /var/folders/q9/2tg_lt9j6nx29rvr5r5jn_bw0000gp/T/confluent.DiB0uT89/ksql-server/
total 4120
drwxr-xr-x  3 Robin  staff       96  2 May 15:23 data
-rw-r--r--  1 Robin  staff        6  2 May 15:23 ksql-server.pid
-rw-r--r--  1 Robin  staff      411  2 May 15:23 ksql-server.properties
-rw-r--r--  1 Robin  staff  1464728  2 May 16:55 ksql-server.stdout
drwxr-xr-x  3 Robin  staff       96  2 May 15:23 logs
Robin@asgard02 /p/v/f/q/2/T/c/ksql-server>

This may seem a nit, but any user who goes debugging would expect to find all the log files under the log folder.

rmoff commented 6 years ago

Actually this may be one for Confluent CLI? /cc @kkonstantine

kkonstantine commented 6 years ago

That's currently consistent to what all the services do @rmoff, when run for dev purposes with Confluent CLI. Anything on stdout goes to the file you mention at the top service dir. If you want such logs in logs you should change the logger for this service to redirect the logs to a file instead of STDOUT. The fact that a lot of services output by default their logs to stdout is beyond the responsibilities of the CLI. (Again, this is configurable via the log4j properties for each service).