Skip to content

Commit

Permalink
Fixed: Changed log level always to info in minilang (OFBIZ-6206)
Browse files Browse the repository at this point in the history
Because the log level always is display as FATAL on log, this raise useless log and generate many noise for production site.
Generally these logs are present for debugging historical reason

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1780691 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
nmalin committed Jan 28, 2017
1 parent 40a98de commit 03d10e5
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 76 deletions.
3 changes: 1 addition & 2 deletions applications/content/minilang/blog/BlogServices.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
<!-- reset contentIdFrom to new contentId -->
<set field="contentAssocTypeId" value="SUB_CONTENT"/>
<set field="contentIdFrom" from-field="contentId"/>


<if-not-empty field="parameters._uploadedFile_fileName">
<!-- upload a picture -->
Expand Down Expand Up @@ -92,7 +91,7 @@
<set field="createText.contentIdFrom" from-field="contentIdFrom"/>
<set field="createText.partyId" from-field="userLogin.partyId"/>
<set field="createText.mapKey" value="ARTICLE"/>
<log level="always" message="calling createTextContent with map: ${createText}"/>
<log level="info" message="calling createTextContent with map: ${createText}"/>
<call-service service-name="createTextContent" in-map-name="createText">
<result-to-field result-name="contentId" field="textContentId"/>
</call-service>
Expand Down
26 changes: 12 additions & 14 deletions applications/content/minilang/content/ContentEvents.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ under the License.
<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ofbiz.apache.org/Simple-Method" xsi:schemaLocation="http://ofbiz.apache.org/Simple-Method http://ofbiz.apache.org/dtds/simple-methods.xsd">

<simple-method method-name="createContentAndPurpose" short-description="Create Content And Purpose" login-required="false">
<log level="always" message="in createContentAndPurpose."/>
<log level="always" message="parameters: ${parameters}"/>
<log level="info" message="in createContentAndPurpose."/>

<make-value entity-name="Content" value-field="currentContent"/>
<set-pk-fields map="parameters" value-field="currentContent"/>
Expand All @@ -43,8 +42,7 @@ under the License.
</call-map-processor>
<map-to-map map="currentContent" to-map="context"/>

<log level="always" message="currentContent: ${currentContent}"/>
<log level="always" message="context: ${context}"/>
<log level="info" message="currentContent: ${currentContent}"/>

<set field="context.contentPurposeTypeId" from-field="parameters.contentPurposeTypeId"/>
<string-to-list list="targetOperationList" string="CONTENT_CREATE"/>
Expand All @@ -68,25 +66,25 @@ under the License.
</if-not-empty>
<make-value entity-name="Content" value-field="contentPK"/>
<set field="contentPK.contentId" from-field="contentId"/>
<log level="always" message="contentPK: ${contentPK}"/>
<log level="info" message="contentPK: ${contentPK}"/>
<set field="currentEntityMap.Content" from-field="contentPK"/>
<log level="always" message="currentEntityMap: ${currentEntityMap}"/>
<log level="info" message="currentEntityMap: ${currentEntityMap}"/>
<field-to-session session-name="currentEntityMap" field="currentEntityMap"/>

<if-not-empty field="parameters.contentPurposeTypeId">
<log level="always" message="contentPurposeTypeId: ${parameters.contentPurposeTypeId}"/>
<log level="info" message="contentPurposeTypeId: ${parameters.contentPurposeTypeId}"/>
<make-value entity-name="ContentPurpose" value-field="newContentPurpose"/>
<set field="newContentPurpose.contentPurposeTypeId" from-field="parameters.contentPurposeTypeId"/>
<log level="always" message="contentId: ${contentId}"/>
<log level="info" message="contentId: ${contentId}"/>
<set field="newContentPurpose.contentId" from-field="contentId"/>
<create-value value-field="newContentPurpose"/>
<log level="always" message="newContentPurpose: ${newContentPurpose}"/>
<log level="info" message="newContentPurpose: ${newContentPurpose}"/>
</if-not-empty>
</simple-method>

<simple-method method-name="updateContent" short-description="Update Content" login-required="false">
<log level="always" message="/nin updateContent."/>
<log level="always" message="parameters: ${parameters}"/>
<log level="info" message="/nin updateContent."/>
<log level="info" message="parameters: ${parameters}"/>

<make-value entity-name="Content" value-field="currentContent"/>
<set-pk-fields map="parameters" value-field="currentContent"/>
Expand All @@ -105,7 +103,7 @@ under the License.
</process>
</simple-map-processor>
</call-map-processor>
<log level="always" message="datesConverted: ${datesConverted}"/>
<log level="info" message="datesConverted: ${datesConverted}"/>
<map-to-map map="currentContent" to-map="context"/>
<get-related value-field="currentContent" relation-name="ContentPurpose" list="contentPurposeList"/>
<set field="context.contentPurposeList" from-field="contentPurposeList"/>
Expand All @@ -119,8 +117,8 @@ under the License.
</simple-method>

<simple-method method-name="addContentAssoc" short-description="Add Content Assoc" login-required="true" >
<log level="always" message="in addContentAssoc."/>
<log level="always" message="parameters: ${parameters}"/>
<log level="info" message="in addContentAssoc."/>
<log level="info" message="parameters: ${parameters}"/>

<!-- link article to publish point -->
<set field="context3.contentIdTo" from-field="parameters.contentIdTo"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ under the License.
<set field="currentContent.contentId" from-field="id"/>
</if-empty>

<log level="always" message="currentContent: ${currentContent}"/>
<log level="info" message="currentContent: ${currentContent}"/>

<field-to-list field="parameters.contentPurposeTypeId" list="contentPurposeList"/>
<string-to-list list="targetOperationList" string="CONTENT_CREATE"/>
Expand All @@ -43,7 +43,7 @@ under the License.
<result-to-field result-name="permissionStatus" field="permissionStatus"/>
</call-service>

<log level="always" message="permissionStatus:${permissionStatus}"/>
<log level="info" message="permissionStatus:${permissionStatus}"/>

<if-compare field="permissionStatus" operator="not-equals" type="String" value="granted">
<add-error>
Expand Down
12 changes: 6 additions & 6 deletions applications/content/minilang/content/ContentServices.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,13 @@

<!-- Methods for ContentAssoc -->
<simple-method login-required="true" method-name="assocContent" short-description="Associate Content" >
<log level="always" message="assocContent, parameters:${parameters}"/>
<log level="always" message="assocContent, context:${context}"/>
<log level="info" message="assocContent, parameters:${parameters}"/>
<log level="info" message="assocContent, context:${context}"/>
<call-service in-map-name="parameters" service-name="checkAssocPermission">
<result-to-field result-name="permissionStatus" field="permissionStatus"/>
<result-to-field result-name="rolesOut" field="rolesOut"/>
</call-service>
<log level="always" message="permissionStatus:${permissionStatus}"/>
<log level="info" message="permissionStatus:${permissionStatus}"/>


<set from-field="parameters.contentIdTo" field="pk.contentId"/>
Expand Down Expand Up @@ -269,10 +269,10 @@
<result-to-field result-name="contentId" field="parameters.parentContentId"/>
</call-service>

<log level="always" message="${parameters}"/>
<log level="info" message="${parameters}"/>

<if-not-empty field="parameters.uploadedFile">
<log level="always" message="Uploaded file found; processing sub-content"/>
<log level="info" message="Uploaded file found; processing sub-content"/>
<set-service-fields service-name="createContentFromUploadedFile" map="parameters" to-map="uploadContext"/>
<set field="uploadContext.ownerContentId" from-field="parameters.parentContentId"/>
<set field="uploadContext.contentIdFrom" from-field="parameters.parentContentId"/>
Expand Down Expand Up @@ -806,7 +806,7 @@
<set field="createText.contentIdFrom" from-field="contentIdFrom"/>
<set field="createText.partyId" from-field="userLogin.partyId"/>

<log level="always" message="calling createTextContent with map: ${createText}"/>
<log level="info" message="calling createTextContent with map: ${createText}"/>
<call-service service-name="createTextContent" in-map-name="createText">
<result-to-field result-name="contentId" field="textContentId"/>
</call-service>
Expand Down
5 changes: 1 addition & 4 deletions applications/content/minilang/data/DataServices.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ under the License.
<simple-method method-name="getElectronicText" short-description="Get Electronic Text" login-required="false">
<set field="userLogin" from-field="parameters.userLogin"/>
<set field="currentContent" from-field="parameters.content"/>
<log level="always" message="GETELECTRONICTEXT, currentContent:${currentContent}"/>
<log level="info" message="GETELECTRONICTEXT, currentContent:${currentContent}"/>

<if-empty field="currentContent">
<if-not-empty field="parameters.contentId">
Expand Down Expand Up @@ -149,10 +149,7 @@ under the License.
</if-empty>
<check-errors/>


<field-to-result field="eText.textData" result-name="textData"/>
<log level="always" message="result:${result}"/>
<log level="always" message="parameters:${parameters}"/>
</simple-method>

<simple-method method-name="attachUploadToDataResource" short-description="Attach an uploaded file to a data resource">
Expand Down
Loading

0 comments on commit 03d10e5

Please sign in to comment.