The console-logger is a tool used to log and retrieve messages sent to Opera's console.
All messages sent to the Opera console from the various modules in Opera are captured and displayed.
Changelog
2.0: | First release. |
2.1: | Added Clear and ListMessages. |
Clear
Clear all messages in the console backend, including messages outside the window filter (see the 'WindowManager' service for more information). This does not necessarily clear the UI error console used by Desktop or other projects, as they may choose to store the message information separately.
It will, however, ensure that the next call to ListMessages contain only the messages that occurred between the call to Clear and the call to ListMessages.
Added in version 2.1
command Clear( )
returns ( )
= 2;
ListMessages
Get messages previously dispatched to the console.
Note that Opera does not store all console messages forever. There is a set history size determined by the preference 'Max Console Message' in the 'User Prefs' section. Use the 'Prefs' service to read this value, if desired.
The return value will contain only messages that match the window filter. See the 'WindowManager' service for more information.
Added in version 2.1
command ListMessages( )
returns ( )
= 3;
OnConsoleMessage
event OnConsoleMessage returns ( )
= 1;