This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Logger" improvements
#1
As of r1727, some changes will be introduced for the "Logger" tool.
The ability of logging applications' activity is one of the most important features in JPCSP, especially when used by homebrew develeopers.

In r1727, I've added a new menu under Debug > Tools called Logger. The "Show Logger" option is just the "Toggle console" button with a checkbox, but the big addition is the "Customize" option. This opens a new window called "Customize Logger" where any user will be able to change logging behaviour without having to learn how to work with the .xml files used by log4j (which we use in JPCSP).

Under the "General" tab there're the "Logger" related options that were under the "Configuration" menu and under the "Settings" tab, I've added a small log settings file generator.

Use the options under this tab to change the way the log output file is generated (text version, html version, both or none), the name of the log output file and the settings file path (in case you wish to load a different file from another place). Then, press the "Generate new settings file" and you'll see the text pane change. A new file will be generated, but these settings will go back to their original values, so you can easily reset the file to it's original form.

So, this is only the first installment of "Logger" improvements, and I plan to add features like per module logging, thread monitoring and more.
Please post any issues, opinions or ideas for improvements as a reply to this post. Smile
Reply
#2
The log level dropdown seems to most of the time not list the available log levels (just leaves 'off' as the default and only option). Edit: seems like a dropdown bug -> pressing A/D/etc with the dropdown focused changes it (though it doesn't work anyway).

Is there a way to direct the HTMLAppender to split files once a filesize has been reached? I like the HTML formatting but with debug log level, the file sizes can get pretty unwieldy for any browser (100+mb).
Reply
#3
(08-07-2010, 08:58 PM)Rick Wrote: The log level dropdown seems to most of the time not list the available log levels (just leaves 'off' as the default and only option). Edit: seems like a dropdown bug -> pressing A/D/etc with the dropdown focused changes it (though it doesn't work anyway).

Is there a way to direct the HTMLAppender to split files once a filesize has been reached? I like the HTML formatting but with debug log level, the file sizes can get pretty unwieldy for any browser (100+mb).

Yes, the level combo box doesn't open at all. You need to click on it and either use the arrows or the mouse wheel to move it, which is quite annoying. I'm going to rewrite a few things on the LogWindow and I'll see if I can make it a real combo box.
As for the HTMLAppender, I think it's possible by using "<param name="MaxFileSize" value="xxx"/>". We can add multiple backup appenders and trigger them to output several log files for one huge file.
Reply
#4
I've just added a bunch of new logging features in r1728 based on Orphis and Rick's suggestions.
Under "Settings" there's now a spinner and a check box to allow file splitting. You can choose a maximum file size (up to 100MB) and whenever the log output reaches that size, new splitted files will be generated with the following nomenclature: [name].[type].[number] (e.g.: log.html.1).
Also, I've added an "Advanced" tab that allows more flexibility on which messages to log. On the left side there're a few presets oriented for several different logs:
- General Debug: This is the default option, and the recommended to post on the forums. Logs everything except compiler, runtime and loader events.
- CPU Debug: Logs cpu and compiler events only.
- GPU Debug: Logs GE (from VideoEngine logger) events only.
- Core Debug: Logs JPCSP related events only (runtime, emulator, loader).
- Full Debug: Logs everything.
- Custom: Enables the right side where you can choose each logging category individually.

Please note that these settings (except for the ones under the "General" tab) are never saved between different runs. This is done so you can easily restore the original settings.
The correct way to use this tool is to change any desired settings and press the "Generate new settings file" button (now moved to a more obvious location). This way, a new settings file is generated and will be used by JPCSP on any subsequent runs. Smile
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)