Logging errors to file in Opera 9
Thursday, 20. October 2005, 19:03:04
To enable console logging, you will need to configure it directly through the preferences file (opera6.ini). You can do this by opening opera:config and entering error log in the Quick find field. You will see three options, all in the User Prefs section:
-
Console Error Log
- This is the file name for the error log. Enter the full path to where you want the error log to be created. This defaults to error.log in your profile directory (known as "Opera directory" on the opera:about page).
-
Console Error Log Enabled
- Set this to 1 (tick the box) to enable logging.
-
Console Error Log Filter
- This is where you select what to log. By default, only JavaScript messages are set up to be logged. You can add other sources as a comma separated list (for instance javascript,mail). For a list of the message sources that are available, play around with the console (open with Tools → Advanced → JavaScript console, and yes, we do plan to rename that) and check the filter setting stored to Console Filter (press the Reset button to update the settings in the opera:config document if you have it open while changing the setting in the console).
Once you've configured these, press OK in the document and logging should be active. To test it, you can post messages to the console yourself by writing
javascript:opera.postError("your message here") in the address field or Go to page dialogue (F2).Have fun!


