UNPKG

@canonical/jujulib

Version:
62 lines (61 loc) 1.86 kB
/** Juju Logger version 1. This facade is available on: Controller-machine-agent Machine-agent Unit-agent Models NOTE: This file was generated using the Juju schema from Juju 3.3 at the git SHA 65fa4c1ee5. Do not manually edit this file. */ import { autoBind } from "../../utils.js"; /** LoggerAPI implements the Logger interface and is the concrete implementation of the api end point. */ class LoggerV1 { constructor(transport, info) { this.NAME = "Logger"; this.VERSION = 1; this._transport = transport; this._info = info; // Automatically bind all methods to instances. autoBind(this); } /** LoggingConfig reports the logging configuration for the agents specified. */ loggingConfig(params) { return new Promise((resolve, reject) => { const req = { type: "Logger", request: "LoggingConfig", version: 1, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchLoggingConfig starts a watcher to track changes to the logging config for the agents specified.. Unfortunately the current infrastructure makes watching parts of the config non-trivial, so currently any change to the config will cause the watcher to notify the client. */ watchLoggingConfig(params) { return new Promise((resolve, reject) => { const req = { type: "Logger", request: "WatchLoggingConfig", version: 1, params: params, }; this._transport.write(req, resolve, reject); }); } } LoggerV1.NAME = "Logger"; LoggerV1.VERSION = 1; export default LoggerV1; //# sourceMappingURL=LoggerV1.js.map