In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "what are the types of web logs?" in the operation of actual cases, many people will encounter such a dilemma, and then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Application log
Let's start with the most common log type: application logs.
Most developers think of this log when talking about logging. The reason is simple. Their application generates this log, which contains various error messages, warnings, or other events written by the application. These messages can provide logical high-level information related to a particular use case. Typical examples are:
A stack trace of the exception that occurred in the use case.
Warning message about the slow response time of the external system.
Information that is triggered or completed by a use case.
The application log is probably the most important log type mentioned in this article because you have complete control over it. This means that you are responsible for writing messages.
Each log message needs to provide useful information to help you understand the behavior of the application. If you want to learn more about application logging, you should check out Eric's article, which describes a set of best practices for application logging.
Web and Application Server Log
The next interesting and important type is the log of your Web or application server.
Most enterprise applications are deployed to Web servers (such as Apache Tomcat) or application servers (such as Wildfly or WebSphere Liberty). Their log files provide you with information about technical problems and the current status of the server.
The configuration and functionality of each server are different, and I won't explain them in detail in this article. Be sure to check the documentation of the server and configure it accordingly. Getting the correct information from the server can make a difference between identifying potential problems and server outages.
Garbage collector log
The garbage collector provides automatic memory management. It keeps track of all objects instantiated in JVM and deletes objects that are no longer in use. This is a very complex task, and there are several different garbage collector implementations available.
In general, the garbage collection process in Java is very effective. It is very efficient, and many applications use the default implementation and its standard configuration. However, if your application must handle high loads or use a large number of complex object structures, the application's performance may degrade over time. This usually happens when the garbage collector takes more and more time to manage available memory. The garbage collector log provides you with the necessary information to analyze all garbage collector activities.
By default, the garbage collector log is disabled. You need to use a set of command line properties to activate it.
If you are using JDK 8 or earlier, you can do this using the following properties:
-XX:+ PrintGCDetails-Xloggc:
Starting with JDK 9, you need to use the following properties:
Class = "prettyprint"-Xlog:gc *: file =
< gc - log - file - path >When you start the application using these command line properties, the garbage collector writes detailed information about all operations. Unfortunately, the content and format of the generated garbage collector logs depend on the vendor and version of JVM and the garbage collection algorithm.
System log
All the logs discussed earlier are written by JVM or applications running in JVM. In addition to these logs, you should also be familiar with logs written by the operating system.
As a Java developer, you will probably never write these logs yourself. However, your operating system writes some events to these logs. Other applications that are part of the deployment can do the same. Therefore, the Syslog is a good place to get an overview of external events.
If you run the application on Windows, this is the event log. On Linux, you should know about syslog services and their successors.
Windows event Log
Windows's event log contains important hardware and software events in category applications, security, settings, system, and forwarding events.
Application events and system categories are particularly useful for understanding events that occur outside the application. The application category contains events reported by other applications running on the local Windows system. Hardware and driver related events belong to the system category.
You can learn more about the Windows event log in this article.
Linux system logging
Linux's syslog service and subsequent versions provide a highly configurable logging system. It writes messages triggered by the application or operating system to a file or sends them to a remote system.
The logging service you use and its configuration depend on your Linux distribution. Check the documentation for more information about a specific operating system.
This is the end of the content of "what are the web log types". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.