ome / docker-example-omero

OMERO Docker compose example
BSD 2-Clause "Simplified" License
24 stars 26 forks source link

Where are Omero Server Log files located? #8

Open jithumurugan opened 3 years ago

jithumurugan commented 3 years ago

Hello, could you please let me know where inside the omero-server container will be the log files be generated?

e.g. I attach to the server container using command: docker exec -it $(docker ps -aqf "name=dockerexampleomeromaster_omeroserver_1") /bin/bash

I see there are some files are written here: /OMERO/ManagedRepository/root_0/ Is this the right location or do you have a different location for the log files, Specifically I am trying to use python omero-py (BlitzGateway) client in order to retrieve the image data from server. ................ from omero.gateway import BlitzGateway ................ For such data retrievals, where are the respective logs generated in omero-server container (_name=dockerexampleomeromaster_omeroserver1)?

joshmoore commented 3 years ago

Hi @jithumurugan,

OMERO logs are in: /opt/omero/server/OMERO.server/var/log per https://github.com/ome/omero-server-docker#default-volumes

All the best, ~Josh

jithumurugan commented 3 years ago

Thanks Josh, I did not look into the specific readme before. I was using docker-compose to bring up the respective containers, for this case we will not be able access the server logs easily right, without attaching to the container. I have a solution for this, may be a more flexible version of docker-compse.yml (attached as docker-compose.txt), I have defined the volume data directories to the pwd folders, would this version be better? User can also change the data location to where they want it to be?

docker-compose.txt

joshmoore commented 3 years ago

Definitely.

    volumes:
      - "omero:/OMERO"
      - "omerolog:/opt/omero/server/OMERO.server/var"
 ...
  omerolog:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: '$PWD/omero_server_logs/' 

That's certainly how it's intended to be used. :+1:

jithumurugan commented 3 years ago

May be you could commit this version and edit the readme a bit to involve this information too, so will be useful for the potential users in future :)