mirror of https://github.com/apache/cloudstack.git
Logging related Changes overwritten by S3 Merger
Also did changes to not log the hibernate SQL
This commit is contained in:
parent
a45486a6f3
commit
43f0d0df35
|
|
@ -14,7 +14,7 @@
|
|||
<property name="hibernate.order_updates">true</property>
|
||||
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
|
||||
|
||||
<property name="show_sql">true</property>
|
||||
<property name="show_sql">false</property>
|
||||
<!-- to debug hibernate generated SQL, open following configuration property -->
|
||||
<!--
|
||||
<property name="show_sql">true</property>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<property name="hibernate.order_updates">true</property>
|
||||
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
|
||||
|
||||
<property name="show_sql">true</property>
|
||||
<property name="show_sql">false</property>
|
||||
<!-- to debug hibernate generated SQL, open following configuration property -->
|
||||
<!--
|
||||
<property name="show_sql">true</property>
|
||||
|
|
|
|||
|
|
@ -1,68 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
||||
|
||||
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
|
||||
|
||||
<!-- ================================= -->
|
||||
<!-- Preserve messages in a local file -->
|
||||
<!-- ================================= -->
|
||||
|
||||
<!-- A time/date based rolling appender -->
|
||||
<appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
|
||||
<param name="File" value="${catalina.base}/logs/cloudbridge.log"/>
|
||||
<param name="Append" value="true"/>
|
||||
<param name="Threshold" value="DEBUG"/>
|
||||
|
||||
<!-- Rollover at midnight each day -->
|
||||
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
|
||||
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%d %-5p [%c{3}] (%t:%x) %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<!-- ============================== -->
|
||||
<!-- Append messages to the console -->
|
||||
<!-- ============================== -->
|
||||
|
||||
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
|
||||
<param name="Target" value="System.out"/>
|
||||
<param name="Threshold" value="DEBUG"/>
|
||||
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%d{ABSOLUTE} %5p %c{1}:%L - %m%n"/>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<!-- ================ -->
|
||||
<!-- Limit categories -->
|
||||
<!-- ================ -->
|
||||
|
||||
<category name="com.cloud">
|
||||
<priority value="DEBUG"/>
|
||||
</category>
|
||||
|
||||
<!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
|
||||
<category name="org.apache">
|
||||
<priority value="INFO"/>
|
||||
</category>
|
||||
|
||||
<category name="org">
|
||||
<priority value="INFO"/>
|
||||
</category>
|
||||
|
||||
<category name="net">
|
||||
<priority value="INFO"/>
|
||||
</category>
|
||||
|
||||
<!-- ======================= -->
|
||||
<!-- Setup the Root category -->
|
||||
<!-- ======================= -->
|
||||
|
||||
<root>
|
||||
<level value="INFO"/>
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
<appender-ref ref="FILE"/>
|
||||
</root>
|
||||
|
||||
</log4j:configuration>
|
||||
|
|
@ -198,7 +198,7 @@ public class ServiceProvider {
|
|||
if(logger.isInfoEnabled())
|
||||
logger.info("Initializing ServiceProvider...");
|
||||
|
||||
File file = ConfigurationHelper.findConfigurationFile("log4j-cloud-bridge.xml");
|
||||
File file = ConfigurationHelper.findConfigurationFile("log4j-cloud.xml");
|
||||
if(file != null) {
|
||||
System.out.println("Log4j configuration from : " + file.getAbsolutePath());
|
||||
DOMConfigurator.configureAndWatch(file.getAbsolutePath(), 10000);
|
||||
|
|
@ -327,6 +327,7 @@ public class ServiceProvider {
|
|||
try {
|
||||
result = method.invoke(serviceObject, args);
|
||||
PersistContext.commitTransaction();
|
||||
PersistContext.commitTransaction(true);
|
||||
} catch (PersistException e) {
|
||||
} catch (SessionException e) {
|
||||
} catch(Throwable e) {
|
||||
|
|
@ -345,6 +346,7 @@ public class ServiceProvider {
|
|||
}
|
||||
} finally {
|
||||
PersistContext.closeSession();
|
||||
PersistContext.closeSession(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue