Configuration information of Log4j. xml and Log4j. xml
Source code
1
Log4j. xml configuration
Value = "[% d {dd HH: mm: ss, SSS/} %-5 p] [% t] % c {2/}-% m % n"/>Value = "[% d {MMdd HH: mm: ss SSS/} %-5 p] [% t] % c {3/}-% m %
Add log4j to Web. xml and log4j to Web. xml
The configuration file is as follows. Web. xml
The log4jproperties file exists and is also configured in webxml. Why does it still report the above error?
Modify the log4j path
log4j, You need to include the following JAR packages in your classpath, it depends on which slf4j and the log4j version you are using. For example:
The slf4j-api-1.6.1.jar-jar for slf4j API
The log4j-1.2.16.jar-jar for log4j API
Slf4j-log4j12-1.6.1.jar-log4j adapter fo
The previous article on the log4j of the properties of the configuration, although the sense of difference is not very large, but the Log4j.properties configuration method can not use filter filter to limit the log level, another reason is Log4j.xml SQL statements can be placed in the Conversionpattern parameter of the Layout property when the database is inserted, and the log4j.properties configuration becomes more cumbersome . First, step1. Introdu
Reference articleshttp://willow-na.iteye.com/blog/347340(1) configuration fileHere is the code that came directly from that article, made some changes, and will also fill in some other content, I hope the original author does not mindXML version= "1.0" encoding= "UTF-8"?>DOCTYPE log4j:configuration SYSTEM "Log4j.dtd"> log4j:configurationxmlns:log4j= ' http://jakarta.apache.org/log4j/' > Appendername= "MyConsole"class= "Org.apache.log4j.ConsoleAp
Configuration parameter Description:
(1). The output mode Appender generally has 5 kinds:
Org.apache.log4j.RollingFileAppender (scrolling file, automatic recording of the latest log)
Org.apache.log4j.ConsoleAppender (console)
Org.apache.log4j.FileAppender (file)
org.apache.log4j.DailyRollingFileAppender (generate one log file per day)
Org.apache.log4j.WriterAppender (send log information to any specified place in streaming form
already contains the functions of Webapprootlistener.General configuration Type the following example: XML code
log4jrefreshinterval in Web. XML
Log4jrefreshinterval is 3000 to open a watchdog thread to scan for changes in configuration files every 3 seconds.
The ability to dynamically modify the Log4j.properties key, the container scans the log4j config
When deploying two or more projects under Tomcat, it is best to define the Webapprootkey parameter in the Web. xml file and, if undefined, default to "Webapp.root", as follows: Application Path - Context-param> Param-name>WebapprootkeyParam-name> Param-value>Webapp.rootParam-value> Context-param> Best newspaper The parameter values for each item are different to avoid conflicting itemsSeverity: Exception sending context
Transferred from: http://blog.csdn.net/arvin_qx/article/details/6829873When deploying two or more projects under Tomcat, it is best to define the Webapprootkey parameter in the Web. xml file and, if undefined, default to "Webapp.root", as follows:It is best to ensure that the parameter values for each item are different to avoid conflicting items:Web App root system property already set to different value: ' webapp.root ' = [C:\Program Files (x86) \ap
When deploying two or more projects under Tomcat, it is best to define the Webapprootkey parameter in the Web. xml file, which, if undefined, defaults to "Webapp.root", as follows:
Best newspaper The parameter values for each item are different to avoid conflicting items
Severity: Exception sending context initialized event to listener instance of class Org.springframework.web.util.Log4jConfigLis TenerJava.lang.IllegalStateException:Web App root syst
Web projects sometimes experience the need to dynamically generate zip and download, but we do not want to generate redundant temporary files when generating zip files. Below will
Introduce my way of handling. There are improper places also hope that everyone criticized the advice.
This requirement is described as follows:1. Generate XML files dynamically based on data2. Package a dynamically generated
xml| Download | Application Example
1.flash+xml do the picture browser (normal type)
Recommended reasons:Special Note: Please pay special attention to this flash source file, read the external XML when written asAs for why, you'll see! Special thanks to friends White Crow (NetEase Flash leader) to provide ...
. Delete Attributes To delete an attribute, such as the id attribute of the book node with ID 0001, we can use the following code: --Delete attributes Set @xmlDoc. Modify (' delete root/book[@id = "0001"]/@id ') Select @xmlDoc. Query (' (/root/book) [1] ') Run results 6. Modifying properties Modifying property values is also very common, such as modifying the ID property of the book node with ID 0001 to 0005, which we can use as follows: --Modify properties Set @xmlDoc. Modify (' Replace value
This article illustrates how C # implements exporting list data to XML files. Share to everyone for your reference, specific as follows:
C # Exports list data to an XML file, where the main uses are:
XmlSerializer Class (System.Xml.Serialization)
Serializes an object into an XML document and deserializes an object from an
[Open-source download] winform-based xml menu Editor (c # source code ),
Xml editor source code
Recently, I helped my friends build a file management system. The client can upload files to the server, download files from the server, and support multiple users. The networkcomms v3 framework used by the communication f
Software Exchange Group: 571171251 (software available within the group)Krpano Technology Group: 551278936 (software available within the group)Introduction to Software functionsThe Krpano Resource Analysis tool has the following characteristics:1. Analysis and save the site resources, including viewing the site resources tree (tile) structure, a single resource file open in real-time, the whole station resources batch storage, resource filtering, filtering and saving functions2. One-click decry
Fetching URL of xml, and download it using other download tools.
Method: grep 'fetching url'
Result:
Fetching URL: http://dl-ssl.google.com/android/repository/addon-6.xml
Fetching URL: http://dl-ssl.google.com/android/repository/addon.xml
Fetching URL: http://dl-ssl.google.com/android/repository/extras/intel/addon.xm
1. image browser made of Flash + XML (common)
Recommendation reason:Note: Please pay special attention to the as written when reading external XML in the Flash source file.As for why, you can see it! Thank you very much for the white crow (head of Netease flash ......:Picview.rarUnzip the password: www.flashbank.cn
2. Auto Rotation of images loaded in XML format
Pack the file into an XML file package. It is an ASP tool that can be unwrapped!
Package all the website source code into the XML file, generate the updata. xml file, and upload the XML file to the space.Then, release all the files through the install. asp file.Just like the automatic installation package of Z-blog.
Usually when we go through the href link file, the general situation is for the zip, jar and other download functions, and for XML, CSS, HTML, JS and so is the view function.The following code can now generate a string in XML format to generate an XML file so that the XML fi
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.