GM log: Difference between revisions

From GreaseSpot Wiki
Jump to navigationJump to search
(Starting from: http://greasemonkey.mozdev.org/authoring.html)
 
(version note)
Line 18: Line 18:


  GM_log("Hello, World!");
  GM_log("Hello, World!");
= Notes =
GM_log is available in [[Greasemonkey]] version 0.3 and later.

Revision as of 19:43, 3 November 2006

Syntax

GM_log( message, level )

Description

Allows script authors simple access to logging informational messages in the Error Console. This can be helpful for debugging.

Level is optional and defaults to 0. Valid values are:

0
info
1
warning
2
error

Examples

GM_log("Hello, World!");

Notes

GM_log is available in Greasemonkey version 0.3 and later.