mirror of https://github.com/apache/cloudstack.git
logging changes
This commit is contained in:
parent
f3d7d075ee
commit
97b562fc2a
|
|
@ -1270,6 +1270,7 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
|||
return _routerDao.persist(router);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DomainRouterVO findById(long id) {
|
||||
return _routerDao.findById(id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2296,7 +2296,6 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
|||
return createVirtualMachine(zone, serviceOffering, template, hostName, displayName, owner, diskOfferingId, diskSize, networkList, null, group, userData, sshKeyPair, hypervisor, caller);
|
||||
}
|
||||
|
||||
@DB
|
||||
@ActionEvent(eventType = EventTypes.EVENT_VM_CREATE, eventDescription = "deploying Vm", create = true)
|
||||
protected UserVm createVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, String hostName, String displayName, Account owner, Long diskOfferingId,
|
||||
Long diskSize, List<NetworkVO> networkList, List<Long> securityGroupIdList, String group, String userData, String sshKeyPair, HypervisorType hypervisor, Account caller) throws InsufficientCapacityException, ResourceUnavailableException, ConcurrentOperationException, StorageUnavailableException, ResourceAllocationException {
|
||||
|
|
|
|||
|
|
@ -875,7 +875,7 @@ public abstract class GenericDaoBase<T, ID extends Serializable> implements Gene
|
|||
return lockRow(id, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override @DB(txn=false)
|
||||
public T lockRow(ID id, Boolean lock) {
|
||||
return findById(id, false, lock);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ public class Transaction {
|
|||
Transaction txn = tls.get();
|
||||
assert txn != null : "No Transaction on stack. Did you mark the method with @DB?";
|
||||
|
||||
assert checkAnnotation(3, txn) : "Did you even read the guide to use Transaction...IOW...other people's code? Try method can't be private. What about @DB? hmmm... could that be it? " + txn.toString();
|
||||
assert checkAnnotation(3, txn) : "Did you even read the guide to use Transaction...IOW...other people's code? Try method can't be private. What about @DB? hmmm... could that be it? " + txn;
|
||||
return txn;
|
||||
}
|
||||
|
||||
|
|
@ -354,7 +354,7 @@ public class Transaction {
|
|||
if (_stmt != null) {
|
||||
try {
|
||||
if (s_stmtLogger.isTraceEnabled()) {
|
||||
s_stmtLogger.trace("Closing: " + _stmt.toString());
|
||||
s_stmtLogger.trace("Closing: " + _stmt);
|
||||
}
|
||||
try {
|
||||
ResultSet rs = _stmt.getResultSet();
|
||||
|
|
@ -366,7 +366,7 @@ public class Transaction {
|
|||
}
|
||||
_stmt.close();
|
||||
} catch (final SQLException e) {
|
||||
s_stmtLogger.trace("Unable to close statement: " + _stmt.toString());
|
||||
s_stmtLogger.trace("Unable to close statement: " + _stmt);
|
||||
} finally {
|
||||
_stmt = null;
|
||||
}
|
||||
|
|
@ -721,7 +721,7 @@ public class Transaction {
|
|||
} else if (item.type == STATEMENT) {
|
||||
try {
|
||||
if (s_stmtLogger.isTraceEnabled()) {
|
||||
s_stmtLogger.trace("Closing: " + ref.toString());
|
||||
s_stmtLogger.trace("Closing: " + ref);
|
||||
}
|
||||
Statement stmt = (Statement)ref;
|
||||
try {
|
||||
|
|
@ -734,7 +734,7 @@ public class Transaction {
|
|||
}
|
||||
stmt.close();
|
||||
} catch (final SQLException e) {
|
||||
s_stmtLogger.trace("Unable to close statement: " + item.toString());
|
||||
s_stmtLogger.trace("Unable to close statement: " + item);
|
||||
}
|
||||
} else if (item.type == ATTACHMENT) {
|
||||
TransactionAttachment att = (TransactionAttachment)item.ref;
|
||||
|
|
@ -783,7 +783,7 @@ public class Transaction {
|
|||
_conn.rollback(sp);
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
s_logger.warn("Unable to rollback to savepoint " + sp.toString());
|
||||
s_logger.warn("Unable to rollback to savepoint " + sp);
|
||||
}
|
||||
|
||||
if (!hasTxnInStack()) {
|
||||
|
|
@ -899,7 +899,7 @@ public class Transaction {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return type + "-" + (ref != null ? ref.toString() : "");
|
||||
return type + "-" + ref;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue