How to turn on debug logging docker images

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

How to turn on debug logging docker images

Hi There,

I am using the following public docker images from alfresco hub for starting up alfresco:

alfresco/alfresco-content-repository-community:6.2.1-A8

alfresco/alfresco-transform-core-aio:2.3.4

alfresco/alfresco-share:6.2.1

I wanted to check how to turn debug logging on for them? Is there an environment variable I could pass in to enable that?

Many thanks,

Richa

 

1 Reply
Moderator
Moderator

Re: How to turn on debug logging docker images


I wanted to check how to turn debug logging on for them? Is there an environment variable I could pass in to enable that?

 

 


For the services which are based upon spring boot e.g. 'alfresco-transform-core-aio', you can set debug log level via docker compose. But you can't do that for acs/share. I am afraid that this is not an option available via docker compose for acs/share.

example of spring boot based apps:

transform-core-aio:
        image: alfresco/alfresco-transform-core-aio:2.3.4
        mem_limit: 1536m
        environment:
            JAVA_OPTS: "
            -Dlogging.level.web=debug
            -Xms256m -Xmx1536m"
        ports:
            - 8090:8090

If you are using enterprise version, you have an option in admin console to set/enable/disable log settings (these settings are not presisted and on restart any setting done via admin console will be lost) found under support-tools

You seems to be using community version, and support-tools is not by default available for this version. You can use this add-on : https://github.com/OrderOfTheBee/ootbee-support-tools to get the similar options. 

You would have to apply the amps on both alfresco and share war file deployed under the containers. However, if you terminate the containers all these additions will be lost. 

The best option would be to use DockerFile in combination with docker-compose and build the image with any add-ons/extensions, custom log4j etc. 

Here is an example of DockerFile usage in docker-compose:

https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/docker-compose.yml#L15

https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/configs-to-override/alfres...

You can also take a look at this thread on how to copy/apply extensions via dockerfile:

https://github.com/Alfresco/acs-community-deployment/issues/131#issuecomment-691300550

Additonally, if you wish to connect to the containers, you can do it using below given command and update the log levels as usual you do on any linux sever where acs is deployed.

https://docs.alfresco.com/6.2/tasks/log-levels-set.html

Connect to a container:

docker exec -i -t <container_Name/id> /bin/bash

example:
docker exec -it docker_alfresco_1 /bin/bash

 

 

~Abhinav
(ACSCE, AWS SAA-C02, GAIQ)