Skip to content
PatriikPlays edited this page Dec 24, 2021 · 2 revisions

Log4po (log for plotos) can log strings, numbers or tables.

log4po.log(object ...)

Logs out all objects that have been passed to it ex: log4po.log("abc",{test={"hi"},"hi"})


log4po.error(string ...)

Logs out all strings that were passed to it in red ex: log4po.error("Error: abc", "asfosfaiko")


log4po.textComponentLog(TextComponent textComponent)

Logs out text component or a list of text components ex: log4po.textComponentLog(textComponent)


log4po.textComponentLog(TextComponent[] textComponents)

Logs out a list of text components ex: log4po.textComponentLog({textComponent1,textComponent2,textComponent3})


log4po.textComponentListToString(TextComponent[] textComponents)

Returns a string from all of the text components in the text component list that was given to the function ex: print(log4po.textComponentListToString({textComponent1,textComponent2,textComponent3})) textComponent1ContentstextComponent2ContentstextComponent3Contents


log4po.newTextComponent(string text, HexColor backgroundColor, HexColor foregroundColor)

Returns a text component with the data passed to the function ex: log4po.textComponentLog(log4po.newTextComponent("test",0x000000,0xffffff)) test


log4po.tableToTextComponentList(table t)

Returns a text component list with syntax highlighting and basic formatting of a lua table which can be passed to log4po.textComponentLog to print them to the screen log4po.log uses this to print tables ex: log4po.textComponentLog(log4po.tableToTextComponentList({test={"hi"},"hi"})) {[1] = "hi", ["test"] = {[1] = "hi"}} I don't think its possible to have colored text in github markdown but if it is then just complain with an issue (just not images)