namespace Logger ' Put the file at the root directry to avoid needing to create a folder const LOGS_FILE_PATH = "cachefs:/playlet_startup_logs.txt" function Init() DeleteFile(LOGS_FILE_PATH) end function function Log(msg as string) msg = "[APP] " + msg ' bs:disable-next-line LINT3012 print(msg) buffer = CreateObject("roByteArray") buffer.FromAsciiString(msg + `\n`) buffer.AppendFile(LOGS_FILE_PATH) end function end namespace