From 3550f7bff5223f6d835ce74329eb4329abe5bc7f Mon Sep 17 00:00:00 2001 From: Michael Demmer Date: Thu, 23 Aug 2018 07:11:54 -0700 Subject: [PATCH] enable query logging to file in the local examples Signed-off-by: Michael Demmer --- examples/local/vtgate-up.sh | 1 + examples/local/vttablet-up.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/examples/local/vtgate-up.sh b/examples/local/vtgate-up.sh index faa9fb9d932..71d2d6eb474 100755 --- a/examples/local/vtgate-up.sh +++ b/examples/local/vtgate-up.sh @@ -66,6 +66,7 @@ fi $VTROOT/bin/vtgate \ $TOPOLOGY_FLAGS \ -log_dir $VTDATAROOT/tmp \ + -log_queries_to_file $VTDATAROOT/tmp/vtgate_querylog.txt \ -port $web_port \ -grpc_port $grpc_port \ -mysql_server_port $mysql_server_port \ diff --git a/examples/local/vttablet-up.sh b/examples/local/vttablet-up.sh index 0bd71527b16..893621345ef 100755 --- a/examples/local/vttablet-up.sh +++ b/examples/local/vttablet-up.sh @@ -95,6 +95,7 @@ for uid_index in $uids; do grpc_port=$[$grpc_port_base + $uid_index] printf -v alias '%s-%010d' $cell $uid printf -v tablet_dir 'vt_%010d' $uid + printf -v tablet_logfile 'vttablet_%010d_querylog.txt' $uid tablet_type=replica if [[ $uid_index -gt 2 ]]; then tablet_type=rdonly @@ -105,6 +106,7 @@ for uid_index in $uids; do $VTROOT/bin/vttablet \ $TOPOLOGY_FLAGS \ -log_dir $VTDATAROOT/tmp \ + -log_queries_to_file $VTDATAROOT/tmp/$tablet_logfile \ -tablet-path $alias \ -tablet_hostname "$tablet_hostname" \ -init_keyspace $keyspace \