Java Log Viewer Logs Viewer

Source: Internet
Author: User
Tags jboss

工欲善其事 its prerequisite

The Java development in the eyes of Stormy, an old Domino programmer, I mentioned the large number of logs that are being encountered in Java development. Server Console Brush-like scrolling, log files grow rapidly, debug when the relevant information is often flooded with examples, in many logger gushing output, to find out where the error is sometimes very cost-effective eye. The role of the log is no doubt that large-scale projects are not uncommon in the production of logs. In previous Domino development, the Domino server was quite modest in generating logs, and the programmer was not very dependent on the logs. Switching to Java development, I have been using my favorite text editor EditPlus melee for a while (if it's difficult to open a log with more than 10 or even dozens of megabytes with a notepad from Windows), it's becoming more and more urgent to feel the need for a more professional weapon. The Java Log Viewer (log viewer) is the name of the tool that I imagined, with features such as:

1. You can manually reload the log. This prevents the automatic tracking log from affecting the current concerns, and allows you to easily load up-to-date logs when you need them.

2. Color labels for different levels of log entries.

3. You can filter logs by level.

4. Easy to search.

A search on the internet found that this is what many people want, and as with many tools, the problem is not lack of, but among the many candidates to choose.

Otroslogviewer

Based on the Java Log Viewer three keyword search results and stackoverflow on the corresponding issues discussed, after a trial and comparison of "Note 1", I am sure Otroslogviewer (http://code.google.com/p/ otroslogviewer/) is what I want.

In addition to the features I originally envisioned, Otroslogviewer also offers the following conveniences:

5. Displays the log entries as a list, showing the details of the currently selected row at the bottom, and the columns of the table can be cropped.

6. You can filter logs by time, level, logger name, thread, and so on.

7. Can quickly navigate to the previous or next level of the log.

8. Can mark the log, also can be automatically marked according to many practical conditions.

9. Preset support for multiple format logs, and an editor for easy customization of the log4j log pattern (pattern) to be resolved.

Not only that, the software's interface is beautiful and the operation is friendly.

Demonstrate

The following is an example of the use of otroslogviewer in the log generated by the JBoss as 7.1 I am dealing with.


Post-boot interface

In addition to the basic commands of the menu bar, the Otroslogviewer functions are provided by buttons or shortcut menus, intuitive operation, and user-friendly features that appear in the right place in a convenient way. It does not have a general Software setup interface, and various settings are combined in the Operation view.

Otroslogviewer has two basic functions, open XXX log and tail xxx log, which is used to open a static log file, the latter can automatically refresh (that is, the meaning of tail tracking) a live log file. Software support includes parsing of various formats, such as log4j plain text and XML, with corresponding menu commands. If you are unsure of the format in which the log is used, Otroslogviewer can automatically detect when the log is opened. The default log4j log mode is

%D{YYYY-MM-DDHH:MM:SS,SSS}%-5p [%t]%m%n

I use JBoss as 7.1 (from the JBoss profile Standalone.xml or the Web management interface to see the default log processor mode as

%d{hh:mm:ss,sss}%-5p [%c] (%t)%s%e%n

To parse such a log, you can call tools---Show log4j Pattern Parser Editor in the menu.


Change the associated initial configuration to

Pattern=timestamp level [CLASS] (THREAD) MESSAGE

Dateformat=hh:mm:ss,sss

You can see the loaded log files in the same interface, and you can test the parsing results at any time after modifying the schema. After success, save the schema as a new pattern file. The two sets of open and tail menus in the software automatically add commands that use this new mode.

Open a log file, all log entries are displayed in the list, and the time column automatically displays only the time portion of the date. Different levels of logs are clearly distinguished by different color icons. The details of the selected row log are shown in the following view, including both the error stack and the SOAP message are formatted and shaded. With 10 minutes, you'll find that only these reading logs are more efficient. There is a search box to the left of the toolbar and a button on the right to navigate to the previous or next level of logs. Each log can be labeled (mark) or annotated (note), and the tool view on the left side of the main viewing can set and display filtering and common auto-tagging capabilities. In particular, the two icons above the list view, the first one toggles whether the new log is automatically read, and the second icon controls whether the current row in the list is followed by the most recent row read in the auto-refresh state. These two features combine to make it easy to read live logs.


Finally, we will show you the rich options in the shortcut menu after checking the log, filtering and deleting are useful and can quickly eliminate irrelevant logs.

Note 1:apache Chainsaw has not been updated for many years, many bugs, poor performance.

A project named directly in the Java Log Viewer is too simple and only applies to logs generated by java.util.logging.

stackoverflow a recommended Logexpert there is an obvious and significant bug in the current version 1.5, and the software will automatically jump to the latest journal line regardless of whether or not the tracking is set.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.