Advance Workflow: No logger.log on Alfresco SDK 3.0

cancel
Showing results for 
Search instead for 
Did you mean: 
billydekid
Established Member II

Advance Workflow: No logger.log on Alfresco SDK 3.0

Jump to solution

Hi,

I was created an "helloWorld" advance workflow with Alfresco SDK 3.0 from Jeff Potts‌ Blog Creating Custom Advanced Workflows in Alfresco | ECMArchitect | Alfresco Developer Tutorials .

On previous version with Alfresco SDK 2.0 the logger.log is run normally. But nothing appears in alfresco.log when using SDK 3.0. The deployment method used is AMP installation (on Alfresco CE 5.2.e).

This advance workflow works normal only when running on embedded Alfresco server.

Has anyone success running "helloWorld" advance workflow on Alfresco SDK 3.0?

Thank you,

[bayu]

1 Solution

Accepted Solutions
billydekid
Established Member II

Re: Advance Workflow: No logger.log on Alfresco SDK 3.0

Jump to solution

OK found it at /opt/alfresco-community/tomcat/shared/classes/alfresco/extension/ -- by changing custom-log4j.properties.sample name.

Thanks,

View solution in original post

5 Replies
afaust
Master

Re: Advance Workflow: No logger.log on Alfresco SDK 3.0

Jump to solution

"logger.log" will never print anything with the default Alfresco logging configuration, because this causes DEBUG statements to be logged which is below the default threshold for the ScriptLogger class (default setting: log4j.logger.org.alfresco.repo.jscript.ScriptLogger=warn). You need to set the logger to debug via custom-log4j.properties file...

billydekid
Established Member II

Re: Advance Workflow: No logger.log on Alfresco SDK 3.0

Jump to solution

Hi ‌,
Forgot to mention, I already set log4j.logger.org.alfresco.repo.jscript.ScriptLogger=DEBUG on dev-log4j.properties (src/test/resources/alfresco/extension/dev-log4j.properties).

And I didn't find custom-log4j.properties, where's this file located?

afaust
Master

Re: Advance Workflow: No logger.log on Alfresco SDK 3.0

Jump to solution

If you already set dev-log4j.properties you should not need custom-log4j.properties - it is typically located in the same path. The custom-log4j.properties is meant for generic, custom overrides while the dev-log4j.properties is meant for dev-environment stuff. Never mind though that Alfresco does not differentiate between dev environments and any other environments, and it just looks at those configuration files in the precedence order of logj4.properties -> *-log4j.properties -> dev-log4j.properties

I don't use SDK 3, so I would not know if that includes something that messes with the logging configuration...

billydekid
Established Member II

Re: Advance Workflow: No logger.log on Alfresco SDK 3.0

Jump to solution

OK found it at /opt/alfresco-community/tomcat/shared/classes/alfresco/extension/ -- by changing custom-log4j.properties.sample name.

Thanks,

billydekid
Established Member II

Re: Advance Workflow: No logger.log on Alfresco SDK 3.0

Jump to solution

Okay.. Noted. Thanks so much!