MCPcopy Create free account
hub / github.com/extism/java-sdk / setLogFile

Method setLogFile

src/main/java/org/extism/sdk/Extism.java:21–32  ·  view source on GitHub ↗

Configure a log file with the given Path and configure the given LogLevel. @param path @param level @deprecated will be replaced with better logging API.

(Path path, LogLevel level)

Source from the content-addressed store, hash-verified

19 * @deprecated will be replaced with better logging API.
20 */
21 @Deprecated(forRemoval = true)
22 public static void setLogFile(Path path, LogLevel level) {
23
24 Objects.requireNonNull(path, "path");
25 Objects.requireNonNull(level, "level");
26
27 var result = LibExtism.INSTANCE.extism_log_file(path.toString(), level.getLevel());
28 if (!result) {
29 var error = String.format("Could not set extism logger to %s with level %s", path, level);
30 throw new ExtismException(error);
31 }
32 }
33
34 /**
35 * Invokes the named {@code function} from the {@link Manifest} with the given {@code input}.

Callers

nothing calls this directly

Calls 2

extism_log_fileMethod · 0.80
getLevelMethod · 0.80

Tested by

no test coverage detected