Skip to content
offthew edited this page Apr 28, 2022 · 1 revision

Table of Contents

modApi.log:write

Argument name Type Description Require
text string Text you wanna add to log ✔️
path string Path of the log you wanna write in Default is mods.log
modeString string "w" to write a new file, "a" to append to it. Default is "a"

Write text string to a file adding a timestamp. Example:

modApi.log:write("Hello World","mods/myModName/myLog.log")

modApi.log:saveOldLog

Argument name Type Description Require
path string Path of the log you wanna make a backup of Default is mods.log

Append the log file to a file named pathBackup.log Example:

modApi.log:saveOldLog()
Clone this wiki locally