@mikkel-ol/tunnelmole
Version:
Tunnelmole, an open source ngrok alternative. Instant public URLs for any http/https based application. Available as a command line application or as an NPM dependency for your code. Stable and maintained. Good test coverage. Works behind firewalls
22 lines (21 loc) • 428 B
text/typescript
export default async function log(
message: string,
level: "info" | "warning" | "error" = "info",
) {
switch (level) {
case "info":
if (process.env.TUNNELMOLE_DEBUG === "1") {
console.info(message);
}
break;
case "warning":
console.warn(message);
break;
case "error":
console.error(message);
break;
default:
console.info(message);
break;
}
}