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 = JSON.stringify(message);
  }
  logFile.writeSync(new TextEncoder().encode(message + "\n"));
}
