pan3793 commented on a change in pull request #1302: URL: https://github.com/apache/incubator-kyuubi/pull/1302#discussion_r737371111
########## File path: docs/monitor/logging.md ########## @@ -21,11 +21,224 @@ </div> -# Logging +# Monitoring Kyuubi - Logging System -## Server Logging +Kyuubi uses [Apache Log4j](https://logging.apache.org/log4j/2.x/) for logging. -## Process Logging +In general, there are mainly three components in the Kyuubi architecture that will produce component-oriented logs to help you trace breadcrumbs for SQL workloads against Kyuubi. -## Operation Logging +- Logs of Kyuubi Server +- Logs of Kyuubi Engines +- Operation logs +In addition, a Kyuubi deployment for production usually relies on some other external systems. +For example, both Kyuubi servers and engines will use [Apache Zookeeper](https://zookeeper.apache.org/) for service discovery. +The instructions for external system loggings will not be included in this article. + +## Logs of Kyuubi Server + +Logs of Kyuubi Server show us the activities of the server instance including how start/stop, how does it response client requests, etc. + +### Configuring Server Logging + +#### Basic Configurations + +You can configure it by adding a `log4j.properties` file in the `$KYUUBI_HOME/conf` directory. +One way to start is to make a copy of the existing `log4j.properties.template` located there. + +For example, + +```shell +# cd $KYUUBI_HOME +cp conf/log4j.properties.template conf/log4j.properties +``` + +With or without the above step, by default the server logging will redirect the logs to a file named `kyuubi-${env:USER}-org.apache.kyuubi.server.KyuubiServer-${env:HOSTNAME}.out` under the directory of `$KYUUBI_HOME/logs`. + +For example, you can easily find where the server log goes when staring a Kyuubi server from the console output. + +```shell +$ export SPARK_HOME=/Users/kentyao/Downloads/spark/spark-3.2.0-bin-hadoop3.2 +$ cd ~/svn-kyuubi/v1.3.1-incubating-rc0/apache-kyuubi-1.3.1-incubating-bin +$ bin/kyuubi start +``` Review comment: How about ```shell $ echo $SPARK_HOME /Users/kentyao/Downloads/spark/spark-3.2.0-bin-hadoop3.2 $ echo $KYUUBI_HOME /Users/kentyao/svn-kyuubi/v1.3.1-incubating-rc0/apache-kyuubi-1.3.1-incubating-bin $ $KYUUBI_HOME/bin/kyuubi start ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
