GM log: Difference between revisions

From GreaseSpot Wiki
Jump to navigationJump to search
Starting from: http://greasemonkey.mozdev.org/authoring.html
 
Update for 4.0
 
(34 intermediate revisions by 9 users not shown)
Line 1: Line 1:
= Syntax =
As of Greasemonkey 4.0, this method has been removed.
 
You should use the [https://developer.mozilla.org/en-US/docs/Web/API/console.log console] instead.
'''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!");

Latest revision as of 15:03, 3 November 2017

As of Greasemonkey 4.0, this method has been removed. You should use the console instead.