Need help as how to change default solace logging directory

when i am trying to bring the container , it fails by throwing “The file: /usr/sw/jail/logs/debug.log is not writable.” is there a way i can change the logging directory to ay /opt

i beleive if i keep logging_debug_output=none , still debug.log will try to get created but due to permission issue it will not work for me, so i am trying if there is a way i can redirect the default “usr/sw/jail/logs” to the directory where i have access will solve my issue

Hi,

There are two options:

Redirect the logs to stdout (disable logging to files) or disable debug log completely. The log config can be passed in as configuration keys when the docker container is created. See

The other option is to bind mount a host directory or mount a docker volume - each of course with read/write access - into the container at /usr/sw/jail/logs/

I’ve added this to my Docker create script, to externalize all the container volumes into one spot:


--mount 'type=bind,source=/mnt/solace,destination=/var/lib/solace,ro=false' \

Just had to go and make a directory /mnt/solace owned by the container userId “1000001”:


$ ls -l /mnt
total 12K
drwxr-xr-x  6 root    root 4.0K Jul 10 17:31 .
drwxr-xr-x 21 root    root 4.0K Aug 13 15:10 ..
drwxrwxrwx  1 alee    alee 4.0K Aug 15 10:50 c
drwxrwxrwx  1 alee    alee 4.0K Aug 15 10:50 d
drwxr-xr-x  9 1000001 root 4.0K Aug 14 09:08 solace
drwxrwxrwt  5 root    root  100 Aug 14 09:07 wsl

Thanks for adding the example @Aaron

It is generally advisable to create this mount so data is preserved on changes to the container e.g. due to broker updates that require the container to be re-created.

This link explains more:

And this documents the folders within the broker storage: