Commit 68e4f6f7 authored by Fabien Morin's avatar Fabien Morin

add log level


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20213 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 80ea7cc0
...@@ -55,7 +55,7 @@ def ERP5Site_createModuleScribus(self, ...@@ -55,7 +55,7 @@ def ERP5Site_createModuleScribus(self,
# importing module to get an access to the 'searchFolder' method # importing module to get an access to the 'searchFolder' method
# needed to be able to list the objects in 'list_object_view' form # needed to be able to list the objects in 'list_object_view' form
from Products.ERP5.ERP5Site import ERP5Site from Products.ERP5.ERP5Site import ERP5Site
from zLOG import LOG from zLOG import LOG, TRACE, WARNING, ERROR, INFO
# CREATING MODULES INSTANCES # CREATING MODULES INSTANCES
ScribusParser = ScribusParser() ScribusParser = ScribusParser()
...@@ -148,7 +148,7 @@ def ERP5Site_createModuleScribus(self, ...@@ -148,7 +148,7 @@ def ERP5Site_createModuleScribus(self,
# take the input ScribusFile and read the content # take the input ScribusFile and read the content
xml_string = ScribusParser.getContentFile(import_scribus_file) xml_string = ScribusParser.getContentFile(import_scribus_file)
if xml_string == None: if xml_string == None:
LOG('ERP5Site_createModuleScribus', 0, LOG('ERP5Site_createModuleScribus', WARNING,
'no field was defined in the Scribus file') 'no field was defined in the Scribus file')
pass pass
else: else:
...@@ -157,7 +157,7 @@ def ERP5Site_createModuleScribus(self, ...@@ -157,7 +157,7 @@ def ERP5Site_createModuleScribus(self,
# get string from ScribusFile content # get string from ScribusFile content
output_string = str(xml_string) output_string = str(xml_string)
LOG('ERP5Site_createModuleScribus', 0, LOG('ERP5Site_createModuleScribus', INFO,
'createmodule > ScribusParser.getXmlObjectPropertiesDict') 'createmodule > ScribusParser.getXmlObjectPropertiesDict')
# building a tree from the output string elaborated from the # building a tree from the output string elaborated from the
# original Scribus file. # original Scribus file.
...@@ -170,11 +170,11 @@ def ERP5Site_createModuleScribus(self, ...@@ -170,11 +170,11 @@ def ERP5Site_createModuleScribus(self,
#pdb.set_trace() #pdb.set_trace()
(text_field_list, keep_page, page_gap) = \ (text_field_list, keep_page, page_gap) = \
ScribusParser.getXmlObjectsPropertiesDict(xml_string) ScribusParser.getXmlObjectsPropertiesDict(xml_string)
LOG('ERP5Site_createModuleScribus', 0, LOG('ERP5Site_createModuleScribus', INFO,
'createmodule < ScribusParser.getXmlObjectPropertiesDict') 'createmodule < ScribusParser.getXmlObjectPropertiesDict')
LOG('ERP5Site_createModuleScribus', 0, LOG('ERP5Site_createModuleScribus', INFO,
'createmodule > ScribusParser.getPropertiesConversionDict') 'createmodule > ScribusParser.getPropertiesConversionDict')
# parsing text_field_list created from the getXmlObjectsPropertiesDict # parsing text_field_list created from the getXmlObjectsPropertiesDict
# to extract all the usefull properties and organize elements. Then check # to extract all the usefull properties and organize elements. Then check
...@@ -183,13 +183,13 @@ def ERP5Site_createModuleScribus(self, ...@@ -183,13 +183,13 @@ def ERP5Site_createModuleScribus(self,
widget_properties = \ widget_properties = \
ScribusParser.getPropertiesConversionDict(text_field_list) ScribusParser.getPropertiesConversionDict(text_field_list)
LOG('ERP5Site_createModuleScribus', 0, LOG('ERP5Site_createModuleScribus', INFO,
'createmodule < ScribusParser.getPropertiesConversionDict') 'createmodule < ScribusParser.getPropertiesConversionDict')
# testing if final rendering is PDF-like # testing if final rendering is PDF-like
if option_html == 1: if option_html == 1:
LOG('ERP5Site_createModuleScribus', 0, LOG('ERP5Site_createModuleScribus', INFO,
'createmodule > generating background') 'createmodule > generating background')
## BACKGROUND GENERATOR ## BACKGROUND GENERATOR
# extract background pictures from the PDF document, convert them in the right # extract background pictures from the PDF document, convert them in the right
...@@ -202,11 +202,11 @@ def ERP5Site_createModuleScribus(self, ...@@ -202,11 +202,11 @@ def ERP5Site_createModuleScribus(self,
page_width, page_height = image_size page_width, page_height = image_size
LOG('ERP5Site_createModuleScribus', 0, LOG('ERP5Site_createModuleScribus', INFO,
' height = %s' % str(page_height)) ' height = %s' % str(page_height))
LOG('ERP5Site_createModuleScribus', 0, LOG('ERP5Site_createModuleScribus', INFO,
' width = %s' % str(page_width)) ' width = %s' % str(page_width))
LOG('ERP5Site_createModuleScribus', 0, LOG('ERP5Site_createModuleScribus', INFO,
'createmodule < background generated') 'createmodule < background generated')
# add field from OrderedWidgetProperties in ERP5 Module created # add field from OrderedWidgetProperties in ERP5 Module created
...@@ -225,7 +225,7 @@ def ERP5Site_createModuleScribus(self, ...@@ -225,7 +225,7 @@ def ERP5Site_createModuleScribus(self,
properties_css_dict = ManageCSS.setInit() properties_css_dict = ManageCSS.setInit()
# BEGINING DATA INTERPRETATION # BEGINING DATA INTERPRETATION
LOG('ERP5Site_createModuleScribus', 0, LOG('ERP5Site_createModuleScribus', INFO,
'createmodule > begining data interpretation') 'createmodule > begining data interpretation')
#iterating pages #iterating pages
#print " %s" % int(global_properties['page']) #print " %s" % int(global_properties['page'])
...@@ -300,7 +300,7 @@ def ERP5Site_createModuleScribus(self, ...@@ -300,7 +300,7 @@ def ERP5Site_createModuleScribus(self,
# CREATING OBJECT FORM AND MANAGING GROUPS # CREATING OBJECT FORM AND MANAGING GROUPS
LOG('ERP5Site_createModuleScribus', 0, LOG('ERP5Site_createModuleScribus', INFO,
'createmodule > generate fields in ERP Form') 'createmodule > generate fields in ERP Form')
# CREATING ERP5 OBJECT FORM # CREATING ERP5 OBJECT FORM
# create ERP5 Form to handle object view # create ERP5 Form to handle object view
...@@ -326,13 +326,13 @@ def ERP5Site_createModuleScribus(self, ...@@ -326,13 +326,13 @@ def ERP5Site_createModuleScribus(self,
option_html option_html
) )
LOG('ERP5Site_createModuleScribus', 0, LOG('ERP5Site_createModuleScribus', INFO,
'createmodule < fields created in ERP5 Form') 'createmodule < fields created in ERP5 Form')
# PDF IMPORTATION AND TALES GENERATION # PDF IMPORTATION AND TALES GENERATION
LOG('ERP5Site_createModuleScribus', 0, LOG('ERP5Site_createModuleScribus', INFO,
'createmodule > managing PDF settings') 'createmodule > managing PDF settings')
# read all the content of the PDF document and save it in the skin_folder # read all the content of the PDF document and save it in the skin_folder
# as a PDFForm. then iterate the fields to get the corresponding TALES # as a PDFForm. then iterate the fields to get the corresponding TALES
...@@ -343,13 +343,14 @@ def ERP5Site_createModuleScribus(self, ...@@ -343,13 +343,14 @@ def ERP5Site_createModuleScribus(self,
object_title, object_title,
pdf_file=import_pdf_file pdf_file=import_pdf_file
) )
LOG('ERP5Site_createModuleScribus', 0, 'createmodule < PDF settings managed') LOG('ERP5Site_createModuleScribus', INFO,
'createmodule < PDF settings managed')
# PROPERTYSHEET AND DOCUMENT CREATION # PROPERTYSHEET AND DOCUMENT CREATION
LOG('ERP5Site_createModuleScribus', 0, LOG('ERP5Site_createModuleScribus', INFO,
'createmodule > PropertySheet and Document creation') 'createmodule > PropertySheet and Document creation')
# recover personal properties and save them in a PropertySheet # recover personal properties and save them in a PropertySheet
# then create the Document related to the object # then create the Document related to the object
...@@ -364,7 +365,7 @@ def ERP5Site_createModuleScribus(self, ...@@ -364,7 +365,7 @@ def ERP5Site_createModuleScribus(self,
initializeLocalPropertySheetRegistry() initializeLocalPropertySheetRegistry()
from Products.ERP5Type.Utils import initializeLocalDocumentRegistry from Products.ERP5Type.Utils import initializeLocalDocumentRegistry
initializeLocalDocumentRegistry() initializeLocalDocumentRegistry()
LOG('ERP5Site_createModuleScribus', 0, LOG('ERP5Site_createModuleScribus', INFO,
'createmodule < PropertySheet and Document imported') 'createmodule < PropertySheet and Document imported')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment