From ffc3f1f7e3b9ac554c7c03bff1a15587b0b22cb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com> Date: Wed, 25 Feb 2009 16:35:34 +0000 Subject: [PATCH] - LOG when monkey patching git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25713 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/TIDStorage/ZEOClientStorage.py | 3 +++ product/TIDStorage/transaction_transaction.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/product/TIDStorage/ZEOClientStorage.py b/product/TIDStorage/ZEOClientStorage.py index 2cc3a3232d..96926587c7 100644 --- a/product/TIDStorage/ZEOClientStorage.py +++ b/product/TIDStorage/ZEOClientStorage.py @@ -27,6 +27,7 @@ ############################################################################## from ZEO.ClientStorage import ClientStorage +from zLOG import LOG, WARNING, INFO LAST_COMMITED_TID_PROPERTY_ID = '_last_commited_tid' @@ -34,6 +35,8 @@ LAST_COMMITED_TID_PROPERTY_ID = '_last_commited_tid' # New hook must be a local method because it must access tpc_finish's "self" # and original hook. +LOG('TIDStorage',INFO,'Monkey patching ClientStorage.tpc_finish and ClientStorage.getLastCommitedTID') + original_tpc_finish = ClientStorage.tpc_finish def tpc_finish(self, txn, f=None): def saveTIDOnInstance(tid): diff --git a/product/TIDStorage/transaction_transaction.py b/product/TIDStorage/transaction_transaction.py index a151121976..ecc42f2461 100644 --- a/product/TIDStorage/transaction_transaction.py +++ b/product/TIDStorage/transaction_transaction.py @@ -28,7 +28,7 @@ from ExchangeProtocol import ExchangeProtocol from transaction._transaction import Transaction -from zLOG import LOG, WARNING +from zLOG import LOG, WARNING, INFO import socket import thread import struct @@ -40,6 +40,8 @@ TID_STORAGE_ADDRESS = ('127.0.0.1', 9001) tid_storage = None zope_identifier = None +LOG('TIDStorage',INFO,'Monkey patching transaction._transaction.Transaction._commitResources') + # Borrowed from CMFActivity.ActivityTool.getCurrentNode def getZopeId(): """ Return current node in form ip:port """ -- 2.30.9