const logFile = Deno.openSync("./log.txt", {
  create: true,
  write: true,
  read: true,
  append: true,
});

logFile.truncateSync(0);

export function log(...message: any) {
  if (typeof message === "object") {
    message = Deno.inspect(message);
  }
  logFile.writeSync(new TextEncoder().encode(message + "\n"));
}
