Logs File in SDK 4.1

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

Logs File in SDK 4.1

Hi  All,

I am looking for log file in SDK 4.1 Enterprise edition but didnt found it anywhere. Is there any steps to generate or enable log file in sdk?

Please do guide me out.

 

Thanks,

Piyush

2 Replies
Highlighted
Intermediate II

Re: Logs File in SDK 4.1


Following is a list of places that alfresco looks for logging config

                <value>classpath*:alfresco/module/*/log4j.properties</value>
                <!--  Enterprise extensions  -->
                <value>classpath*:alfresco/enterprise/*-log4j.properties</value>
                <!--  Other installed extensions  -->
                <value>classpath*:alfresco/extension/*-log4j.properties</value>
                <!--  private developer overrides -->
                <value>classpath*:alfresco/extension/dev-log4j.properties</value>


so in the SDK ,you can place a log4j.properties file under alfresco/module/*

Highlighted
Moderator
Moderator

Re: Logs File in SDK 4.1

Additonaly, if you are looking for the logs generated from the applications then you won't see them within SDK4.x itself unlike sdk3.x.

With sdk4.x, all your customizations are part of containers launched on docker via docker-compose. If you want to tail logs then you can do following:

1- Either connet to a container e.g. 'alfresco' and tail the log:

Connect:

docker exec -t -i <containerName/Id> /bin/bash

e.g.:

docker exec -t -i default_alfresco_1 /bin/bash

Here, 'default_alfresco_1' is the name of container. You can find list of launched containers by executing "docker ps" command.

2- Use following command to tail all the logs:

docker-compose -f ./docker-compose.yml logs -f

Alternatively, you can update the docker-compose.yml services to bind mount for log files and data.

Example:

services:
    alfresco:
       ......
       ....
        volumes:
          - ./logs/alfresco:/usr/local/tomcat/logs

    share:
       ......
       ....
        volumes:
           - ./logs/share:/usr/local/tomcat/logs
~Abhinav
(ACSCE, AWS SAA-C02, GAIQ)