/*
 * Bach - Java Shell Builder
 * Copyright (C) 2020 Christian Stein
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package de.sormuras.bach;

import de.sormuras.bach.util.Functions;
import java.lang.module.ModuleDescriptor.Version;
import java.net.http.HttpClient;
import java.util.function.Supplier;

/** Bach - Java Shell Builder. */
public class Bach {

  /** Version of the Java Shell Builder. */
  public static final Version VERSION = Version.parse("11.0-ea");

  /** Main entry-point. */
  public static void main(String... args) {
    Main.main(args);
  }

  /** HttpClient supplier. */
  private final Supplier<HttpClient> httpClient;

  /** Initialize this instance with default values. */
  public Bach() {
    this(HttpClient.newBuilder()::build);
  }

  /** Initialize this instance with the specified line printer, workspace, and other values. */
  public Bach(Supplier<HttpClient> httpClient) {
    this.httpClient = Functions.memoize(httpClient);
  }

  public HttpClient getHttpClient() {
    return httpClient.get();
  }

  @Override
  public String toString() {
    return "Bach.java " + VERSION;
  }
}

@@ -694,16 +694,152 @@
 ctions;%0A
+import de.sormuras.bach.util.Logbook;%0Aimport java.io.PrintWriter;%0Aimport java.lang.System.Logger;%0Aimport java.lang.System.Logger.Level;%0A
 import j
@@ -880,16 +880,16 @@
 ersion;%0A
-
 import j
@@ -948,16 +948,51 @@
 upplier;
+%0Aimport java.util.spi.ToolProvider;
 %0A%0A/** Ba
@@ -1244,24 +1244,85 @@
 args);%0A  %7D%0A%0A
+  /** Logbook instance. */%0A  private final Logbook logbook;%0A%0A
   /** HttpCl
@@ -1650,24 +1650,58 @@
 tpClient) %7B%0A
+    this.logbook = new Logbook();%0A
     this.htt
@@ -1741,16 +1741,130 @@
 lient);%0A
+    logbook.log(Level.TRACE, %22Initialized %22 + toString());%0A  %7D%0A%0A  public Logger getLogger() %7B%0A    return logbook;%0A
   %7D%0A%0A  p

Add logbook component