0

我已经安装了 gremlin (v. 2.6.0) 和 ArangoDB (v. 2.8.11),当我通过gremlin.shshell 运行任何请求时,我会收到所有调试消息,例如

11:17:39.713 [main] DEBUG com.arangodb.http.HttpManager - [REQ]http-GET: url=http://localhost:8529/_api/gharial/myDB/edge/E/12712, headers={}
11:17:39.716 [main] DEBUG com.arangodb.http.HttpManager - [RES]http-GET: statusCode=200
11:17:39.716 [main] DEBUG com.arangodb.http.HttpManager - [RES]http-GET: text={"error":false,"code":200,"edge":{"_id":"E/12712"," . . .

我看到这些是 DEBUG 消息,所以我想压制,以免被这些消息淹没,只收到重要消息,如错误或警告。

4

1 回答 1

0

为了减少日志记录,必须更改服务器端和客户端的日志级别。

完成修复此问题的步骤:

  1. 创建配置PATH_TO/confs/目录,里面有:文件confs/arangod.conf b。文件confs/logback.xml

  2. 设置环境。变量CLASSPATH

export CLASSPATH=PATH_TO/confs

  1. 您可以arangod按以下方式开始:

arangod --daemon --pid-file /etc/arangodb/arangodb.pid -c PATH_TO/confs/arangod.conf

的内容 confs/arangod.conf应包含:

  [log]
  ## info, warning, or error
  level = info
  file = PATH_TO/logs/arangodb.log

的内容 confs/logback.xml

<configuration>
  <!-- Arango log4j conf -->
  <appender name="CONSOLE"
      class="ch.qos.logback.core.ConsoleAppender">
          <!-- deny all events with a level below INFO, that is TRACE and DEBUG -->
           <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
                <level>INFO</level>
           </filter>
           <encoder>
           <pattern>
                 %-4relative [%thread] %-5level %logger{30} - %msg%n
           </pattern>
           </encoder>
  </appender>
  <root level="DEBUG">
     <appender-ref ref="CONSOLE" />
  </root>
</configuration>
于 2017-03-21T12:32:26.097 回答