@archon-inc/sdk
Version:
Integrate easily to our government platform using this SDK. More info on https://archon.inc/sdk
24 lines (23 loc) • 921 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.log = log;
const logging_js_1 = require("../types/logging.js");
const recordLog_js_1 = __importDefault(require("./recordLog.js"));
/**
* Logs a message with a general event type and completed outcome. Prefer more specific logging functions when available.
* @param args The message to log.
* @returns {Promise<void>} A promise that resolves when the log is recorded.
*/
async function log(...args) {
// use the same logic as console.log to format the message
const message = args.map((arg) => {
return String(arg);
}).join(" ");
return await (0, recordLog_js_1.default)(message, {
eventType: "general",
outcome: logging_js_1.Outcome.COMPLETED
});
}