Create a logrotate configuration file$ vi/etc/logrotate.d/tomcatAdd the following content:/opt/entermediadb/tomcat/logs/catalina.out { copytruncate daily rotate 7 compress Missingok dateext Size 100m Parameter description:Specify the path to the log file. Copytruncate–creates a copy of the log file and then truncates the original to an empty fil
You need to look at the boot log under Tomcat when there is a problem with the project on the general server, as follows:1.win+r Enter MSTSC in run login to Linux with Telnet client2. Open the SSH Secure Shell Client3. Find the project's TOMCAT:CD/project name/apache-tomcat-7.0.72/bin/enter Tomcat via the command4. If
During development, using the Eclipse tool to start Tomcat or during project debugging, you need to monitor the output's log information in the console, but only the most recent log information is retained in the Eclipse console, and the previous information disappears. It is therefore entirely necessary to redirect the output of the
The 3.1 log type and level
Tomcat logs are grouped into the following 5 categories:
Catalina, equivalent command-line output log
localhost, command line output Log Manager equivalent to localhost host
, Managed log
admin,
Host-manager should be virtual host
the level o
./Startup. Sh
Using catalina_base:/software/Apache-Tomcat-6.0.18Using catalina_home:/software/Apache-Tomcat-6.0.18Using catalina_tmpdir:/software/Apache-Tomcat-6.0.18/tempUsing jre_home:/usr
Run the following command:PS-Ef | grep Tomcat
Check that no Tomcat process exi
Tomcat Log SplitPurpose of implementation:Because of real-world production, the data in the log files generated by the Tomcat service is particularly large and the server storage space is limited. To solve the lack of space, log segmentation is implemented, and
Log output directory under Tomcat control log4j 2008-06-16 20:14
When you configure the output directory of the log4j log file, you always write out the absolute path of the log. I want to write down the log to the root directory of my project. If you write an abs
An IntroductionLinks created using the ln command are divided into soft links and hard links:
Soft Link: "ln–s source file Destination file" will only generate a mirror image of a file in the selected location and will not occupy disk space, similar to Windows shortcuts
Hard link: "ln source file Destination file", without parameter-s, generates a file of the same size as the source file at the selected location
The link created by the LN command, whether it is a soft link or a
To make a long story short, there are many ways to display the Tomcat logs on a Web page, which can be achieved by using different software, but the simplest is to be done in a few local commands.The same partition can be implemented with hard links.First look at your Web root directory: Vim tomcat/conf/server.xml find the Soft Connection Implementation MethodEnter the
Modify the Startup.bat file in Tomcat's Bin directory,
Put 42 lines of:
Call "%executable%" Start%cmd_line_args%
To
Call "%executable%" Run%cmd_line_args% >>. \logs\wudengke213.log
or instead
Call "%executable%" Run%cmd_line_args% >>. \logs\console.%date:~0,10%.log
The first way is to produce only one log file, the second is a
Recently installed centos7.0 to build a web server. Having encountered a problem for a long time:
All Chinese characters in the Tomcat log file are? It is not because of the Linux encoding problem, but because the Java Virtual Machine encoding needs to be set when Tomcat is started.
Therefore, add the following statement to daemon. Sh.
Java_opts = "$ java_opts
Tomcat Production LogFlume crawl log sinking into Kafka
Package a well-written Web project into a war package, Eclise Direct export Export,idea Add a new Artifact-achieve entry in artifact, select the directory where the Web project resides, and build
In the Linux Tomcat WebApp directory into the war package, when you start
Nginx log is not automatic segmentation according to the date, the feeling will be a problem, so I intend to split the log, in the Internet to find the next, feel very troublesome, to split the log, and then also from the Kai PID, should be good use it, I did not test. It feels too troublesome. I wrote one according to the idea. Also very useful. For everyone's r
Normal 0 0 2 false false en-US JA x-none MicrosoftInternetExplorer4
Apache , Tomcat Log Settings
I. Apache log overview
Apache contains two types of logs: error log, access log.
Error log: Storage of diagnostic information a
the application. In fact, from the JVM configuration level can also disable the active GC () method call, plus the parameter "-XX:+DISABLEEXPLICITGC" on it, and then add this parameter restart Tomcat, over a period of time to view GC Log,ok, the reason to find, problem solving! The background is also for development. It is recommended that you do not invoke the System.GC () method in your code to automatic
ttl=64 time=0.033 Ms
-bytes from 192.168.120.204:icmp_seq=11 ttl=64. 027 Ms
[Root@localhost ~]#
Description
Ping 192.168.120.204 > Test.log //Ping the remote host in the background. and output files to Test.log; this practice is also used for more than one file monitoring. Use CTRL + C to terminate.
Example 3: Displaying files starting at line 5th
Command:
Tail-n +5 Log2014.log
Output:
[Root@localhost test]# cat Log2014.
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.