Tabs lets users manage multiple programs at the same time in different tabs.
Note that it doesn't quite run multiple programs at the same time. It only runs the tab the user is currently in, due to limitations with OpenOS's gpus.
Manages buttons and meters. NOTE: There's some breaking refactoring I'd like to do to this library so I recommend not using it for the time being.
Library that contains a lot of boiler plate behind logging.
-
logging.new(file: string | file*, verbosity?: logging.verbosity): Log
Instantiates a newLog
class.file
: Either a filepath or an already opened file to write logs to. If given a file path forfile
andverbosity
is notlogging.verbosity.disabled
, auto-opens the file inwrite
mode.verbosity
: Verbosity level for theLog
. Calls toLog:write
and similar functions don't print if they are passed a higherverbosity
than theLog
class was instantized with. Iflogging.verbosity.disabled
is passed in, the instantizedLog
class is a no-op. You can also use normal integers for this rather than thelogging.verbosity
enum, though I find the enum helps with code readability.
-
logging.verbosity
Enum which contains different log levels:disabled
error
warn
info
debug
-
Log:write(level: verbosity, msg: string)
Writes a message at the given verbosity level to the log, unlesslogging.verbosity.disabled
was passed tologging.new
. -
Log:print(level: verbosity, msg: string)
Writes a message at the given verbosity level to the log, followed by a newline. Basically a wrapper forLog:write
. -
Log:writeFormatted(level: verbosity, format: string, ...: any)
Writes a formatted message using string.format at the given verbosity level to the log, unlesslogging.verbosity.disabled
was passed tologging.new
. -
Log:printFormatted(level: verbosity, format: string, ...: any)
Writes a formatted message at the given verbosity level to the log, followed by a newline. Basically a wrapper forLog:writeFormatted
. -
Log:printTable(level: verbosity, t: table, recursive: boolean)
Recursively prints the contents of a table in a human-readable format. Can get stuck in a recursion-loop if tables point to each other circularly. -
Log:flush()
Flushes log file handler -
Log:close()
Closes log file handler