2017-10-16 14 views
3

インストール詳細:なぜsbt 1.02はデバッグログメッセージを抑制しないのですか?

  • SBT 1.02
  • スカラ座2.12.3
  • のJavaのThinkPad &のMac OS Xシエラの8
  • Ubuntu Linuxの16.04(10.12.6)

私が取った手順:

  1. LinuxとMacの両方に、以下の手順でSBTをインストールしました。http://www.scala-sbt.org/1.x/docs/
  2. Hello Worldの例を作成しました。
  3. SBT内とbashコマンドラインの両方でサンプルプログラムを実行しようとしました。

    Osiris:hello Noel$ sbt 
    [info] Loading project definition from 
    /Users/Noel/src/scala/sandbox/hello/project 
    [info] Loading settings from build.sbt ... 
    [info] Set current project to Hello (in build 
    file:/Users/Noel/src/scala/sandbox/hello/) 
    [info] sbt server started at 127.0.0.1:5256 
    sbt:Hello> logLevel 
    [info] warn 
    sbt:Hello> run 
    [info] Running example.Hello 
    hello 
    [debug] Waiting for threads to exit or System.exit to be called. 
    [debug] Classpath: 
    [debug]  <abbreviated>.../hello_2.12-0.1.0-SNAPSHOT.jar 
    [debug]  <abbreviated>.../scala-library.jar 
    [debug] Waiting for thread run-main-0 to terminate. 
    [debug]  Thread run-main-0 exited. 
    [debug] Interrupting remaining threads (should be all daemons). 
    [debug] Sandboxed run complete.. 
    [debug] Exited with code 0 
    [success] Total time: 0 s, completed Oct 15, 2017 9:44:13 PM 
    sbt:Hello> 
    

    私が試した何を:

    1. コマンドから、ここで

  4. はサンプルです:
  5. は、設定に関係なく、私が試したものの、私はまだデバッグメッセージを見ることになることを観察しました行: sbt警告実行
  6. SBT内から: 警告 実行
  7. は変更が行を含むようにbuild.sbt: LOGLEVEL:ここ= Level.Warn

はbuild.sbtは、次のようになります。

import Dependencies._ 

logLevel := Level.Warn 

lazy val root = (project in file(".")). 
    settings(
    inThisBuild(List(
     organization := "com.example", 
     scalaVersion := "2.12.3", 
     version  := "0.1.0-SNAPSHOT", 
    )), 
    name := "Hello", 
    libraryDependencies += scalaTest % Test 
) 

また、私はこの上で検索しましたフォーラムに参加しましたが、この質問は4年前に聞かれましたが、それらの回答は私のためには機能しません。私は何が欠けていますか?

ありがとうございます。

答えて

関連する問題