Log (Effect) — Skript

Addon: Skript · Category: Effect · Since: 2.0, 2.9.0 (severities)

Syntax

log %strings% [(to|in) [file[s]] %-strings%] [with [the|a] severity [of] (warning|severe)]

Description

Writes text into a .log file. Skript will write these files to /plugins/Skript/logs. NB: Using 'server.log' as the log file will write to the default server log. Omitting the log file altogether will log the message as '[Skript] [<script>.sk] <message>' in the server log.

Examples

on join:
	log "%player% has just joined the server!"
on world change:
	log "Someone just went to %event-world%!" to file "worldlog/worlds.log"
on command:
	log "%player% just executed %full command%!" to file "server/commands.log" with a severity of warning

View source