minetest.log

From Minetest Developer Wiki
Jump to navigation Jump to search

Syntax

<source>minetest.log("loglevel", ["line"])</source>

Description

loglevel is one of <source enclose="none">"deprecated"</source>, <source enclose="none">"error"</source>, <source enclose="none">"action"</source>, <source enclose="none">"info"</source>, <source enclose="none">"verbose"</source>, if line is <source enclose="none">nil</source> then line=loglevel.

Depending on loglevel and configuration settings (such as debug_log_level), these messages may be reported in the chat console, to the Minetest server's stderr/stdout streams (typically visible in the operating system command terminal where minetest was started, if any), and in the debug.txt log file.

Examples

<source> minetest.log("Mod loaded") </source>

<source> minetest.log("error", "Failed to load mod") </source>