More verbose dbdict json loading logging
This commit is contained in:
parent
e93f9eb080
commit
42b9ec819b
1 changed files with 7 additions and 1 deletions
|
@ -2,6 +2,9 @@ import time
|
|||
import os
|
||||
|
||||
import ContentDb
|
||||
from Debug import Debug
|
||||
from Config import config
|
||||
|
||||
|
||||
class ContentDbDict(dict):
|
||||
def __init__(self, site, *args, **kwargs):
|
||||
|
@ -19,6 +22,9 @@ class ContentDbDict(dict):
|
|||
try:
|
||||
self.num_loaded += 1
|
||||
if self.num_loaded % 100 == 0:
|
||||
if config.verbose:
|
||||
self.log.debug("Loaded json: %s (latest: %s) called by: %s" % (self.num_loaded, key, Debug.formatStack()))
|
||||
else:
|
||||
self.log.debug("Loaded json: %s (latest: %s)" % (self.num_loaded, key))
|
||||
content = self.site.storage.loadJson(key)
|
||||
dict.__setitem__(self, key, content)
|
||||
|
|
Loading…
Reference in a new issue