Log4jdbcIs a Java JDBC driver that can log SQL and/or jdbc cils (and optionally SQL timingInformation) for other JDBC drivers
The official homepage is code.google.com/p/log4jdbc/
A log tool that prints SQL statements based on slf4j.The latest version is 1.2 final.
It mainly describes usage:
1. Select the version, mainly jdbc3 and jdbc4.
(); Syslog.setcreatetime (New Date ()); Syslog.setuserid (Appuser.getuserid ()); Syslog.setusername (Appuser.getfullname () ); Syslog.setexeoperation (METHODDESCP); Systemlogservice.save (SysLog);} catch (Exception ex) {Logger.error (Ex.getmessage ());}}}}} return Point.proceed ();}}Configure the injection point with AOP:Note that because the default configuration for AOP is to run embedded code using a proxy, and if the strutsaction inherits Actionsupport, the error is caused by its use of the
environment configuration, so check three places, the first "Java_home"The content of the Java_home is the JDK installation directory. Location:D:\Program Files (x86) \java\jdk1.7.0_60, and no semicolon behind
Second, check classpath, which is a call to a jar package. .; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar; (preceded by a number and semicolon, and a semicolon at the end.)Or can be written as ".; %java_home%\lib ", the same effect.
implementation. Therefore, in the (b) code, if the introduction of commons-logging does not introduce log4j of the rack package, the log can print normally, the printing effect is as follows: If you join LOG4J's rack package (you need to configure Log4j.properties or log4j.xml), the log effect is as follows: In simple terms, Commons-logging will go to find the commons-logging.properties configuration fil
Project Environment1. Project type: Java Web2.web Container: Tomcat3. Frame: Spring4. Calling code: Spring-Configured Scheduled Tasks, task execution classes are injected with @component (starting to think there's a problem here  ̄- ̄| |)Main phenomena1. When Tomcat is started, it is found that the log cannot be written2. Delete log file start again,
the data, and close the connection. In our project, the communication link in the network communication should be the use of short connection;3, priority to use multithreading technology. Multithreading is in the program execution process, the system allows the execution of multiple instructions at the same time, and these instructions do not interfere with each other, in our vision, our project (development of a simple communication software, its basic function is to achieve a one-off network
For some web privacy data, you need to log on first before you can obtain the data. To achieve this using a program, you need to implement automatic login and then save the login information in the Cookie, in order to obtain data, you do not need to log on again. Take NetEase mailbox as an example:Required jar packages: commons-codec-1.3.jar, common-httpclient-3.0.1.jar, common-logging-1.1.1.jar, jaxen-1.1-
For an account at the same time only one person login, you can do this in the following ways:
1. Add the user to a ArrayList when the user logs in
2. When you log on again, see if the user is in ArrayList, and if the user already exists in ArrayList, prevent it from logging in
3. When the user exits, the user needs to be removed from the ArrayList, which is divided into three different cases
① use logout button to exit normally
② Click the browse
Output the log configuration of java log4j to mysql, log4jmysql
Log4j supports outputting logs to files, databases, and even remote servers. This time I will share with you how to output logs to mysql.
(1)The configuration of log4j. properties is as follows:
Log4j. rootLogger = ERROR, appender1, appender2Log4j. appender. appender1 = org. apache. log4j. leleappenderLog4j. appender. appender1.layout = org. ap
In ArcGIS 9.x, 10.0, the following error message is displayed when you log on to the ArcGIS Server for the Java platform management interface:
"The logon information is incorrect", such:
Analysis:During the post process of ArcGIS product configuration, you have entered the correct account name and password and are respectively affiliated to the agsadmin and agsusers groups.
Cause:Distributed COM (DCOM) on
Java Log component Logback use: Load a configuration file under a non-classpath and set a scheduled updateExcerpt: 78874499December 22, 2017 16:20:29Hits: 868 Tags: javalogback log configuration file Logback-xm more Personal Category:Java Log Copyright Notice: This article for Bo Master original article, without Bo Ma
voidaaainta) {7SYSTEM.OUT.PRINTLN ("Non-volatile parameter overloading");8 }9 Ten Public Static voidaaaint... a) { OneSYSTEM.OUT.PRINTLN ("Variable parameter overloading"); A } - - Public Static voidMain (string[] args) { theAAA (111); - } -}The result remains:
Non-volatile parameter overloading
Process finished with exit code 0
Conclusion: When using the variable-parameter overloading method, the non-mutable parameter method is preferred to execute the
Since the last development of the Java EE has been a while, the project has not been completed in a timely manner. Now re-enter a simple login to summarize the Java EE. Do not underestimate this login, the perfectly formed AH. For your future reference and for beginners to learnSystem Framework:Server: JBOSS7.1Database: oracle11gFront Desk: extjs4.2 (for the front desk design headache can be selected, you c
world people think about the pattern of writing code, you can let the software developers better use the code to directly express the real objects exist, the problem space directly mapped to the solution space!Class: The class, in object-oriented programming design, specifically uses "classes" to represent user-defined abstract data types (user_defined abstract type). It abstracts multiple objects with the same state, operation, and access mechanism. Class has three main characteristics of inhe
ObjectiveAs a veteran developer, the logging framework must not be unfamiliar. And in almost all applications, there will be a variety ofThe log framework is used to record the running information of a program. And for a mature Java application, this is essential. In the development and debugging phase, the log can help us to locate the problem faster, and in the
(Level.warn);}5, see the original they are judged there is no console output, if not added to a console output,The identifier for log is: Logger.getlogger ("org.pentaho.di");6, ===============================================================================================================================Thus, we can add a line of code to our program: Manually to join a FileappenderIn the try, the first line joins:Logger.getlogger ("Org.pentaho.di"). A
Recently made a Java Desktop program, the interface using Swt/jface painting, in the process of doing, I want to use the log4j logger log information run, of course, including error logs.Below, I will use log4j to record the use of the following, also includes the configuration method, for future reference1. Configuration method:Import jar Package, Slf4j-log-4j12
What is an agent? What is called a proxy? That is, when calling a method that implements a class, you can do extra work before and after the method is executed, which is the agent. What about the dynamic agent, the official explanation is: The emergence of Java dynamic proxy mechanism, so that Java developers do not have to manually write proxy class, as long as a simple set of interfaces and delegate class
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.