Skip to content

Commit b716f78

Browse files
committed
Add SINGCVMFS_LOGDIR
Add the variable SINGCVMFS_LOGDIR to override the location of the cvmfs logs.
1 parent d0f671f commit b716f78

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
- Add the variable SINGCVMFS_LOGDIR to override the location of the
2+
cvmfs logs.
3+
14
cvmfsexec-4.42 - 24 September 2024
25
- Add rhel9-aarch64 and rhel9-ppc64le machine types.
36
- In makedist help, split machine types from different distributions

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,3 +352,7 @@ $ truncate -s 6G scratch.img
352352
$ mkdir -p tmp/shared
353353
$ mkfs.ext3 -F -O ^has_journal -d tmp scratch.img
354354
```
355+
356+
By default the cvmfs logs are written to a top-level `log` directory, alongside
357+
the top-level `dist` directory. The variable `SINGCVMFS_LOGDIR` can be used to
358+
write them to a different directory, which will be created if it doesn't exist.

singcvmfs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Optional environment variables:
4040
SINGCVMFS_OPTSFILE CVMFS options file (default.local)
4141
- should set at least CVMFS_HTTP_PROXY
4242
SINGCVMFS_SINGOPTS Extra singularity command options
43+
SINGCVMFS_LOGDIR Directory for the cvmfs logs
4344
SINGCVMFS_LOGLEVEL Set to debug to enable cvmfs debugging
4445
!EOF!
4546
exit 1
@@ -103,7 +104,11 @@ fi
103104

104105
echo "CVMFS_NFILES=`ulimit -Hn`" >etc/cvmfs/default.d/00-nfiles.conf
105106
echo "CVMFS_USYSLOG=/var/log/cvmfs/@[email protected]" >etc/cvmfs/default.d/00-usyslog.conf
106-
LOGDIR=$HERE/log
107+
if [ -n "$SINGCVMFS_LOGDIR" ]; then
108+
LOGDIR=$SINGCVMFS_LOGDIR
109+
else
110+
LOGDIR=$HERE/log
111+
fi
107112
mkdir -p $LOGDIR
108113
SINGULARITY_BINDPATH="$SINGULARITY_BINDPATH,$LOGDIR:/var/log/cvmfs"
109114

0 commit comments

Comments
 (0)