Plex scanner cli log location change?

I just realized the location of the cli scanner logs are now different than the plex server log location. I assume this was intentional ? Looking back it seemed as both were in the same location. I was banging my head trying to find the scanner cli logs :man_facepalming:

Library/Logs/Plex Media Server/
vs
Library/Application Support/Plex Media Server/Logs

PMS version and platform?

I’m running 1.28.2.6151 on Ubuntu 22.04. Log file location has not changed. They are in /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs. The only thing in /var/lib/plexmediaserver/Library is Application Support.

A few things that might affect the location and naming of CLI scanner logs - the environment and environment variables configured when launching the scanner, and the --log-file-suffix parameter when calling the scanner.

Currently running the plexinc/pms-docker container. Simply running the scanner within the container itself via /usr/lib/plexmediaserver/Plex\ Media\ Scanner -p -v --analyze-deeply --item 314980 will place the logs in that path. In the example below it actually created a new dir path etc

drwxrwxr-x 1 plex plex 34 Nov  5  2018  Logs.bk
drwxr-xr-x 1 plex plex 34 Sep  8 13:20  Logs
# ls -lrth Logs/Plex\ Media\ Server/
total 8.0K
-rw-r--r-- 1 plex plex 5.0K Sep  8 13:20 'Plex Media Scanner.log'

docker volumen/mount is "/opt/plex:/config:rw" which contains the original Library dir:

# ls -lrht /config/Library/
total 0
drwxrwxr-x 1 plex plex 34 May 16  2017 'Application Support'
drwxrwxr-x 1 plex plex 34 Nov  5  2018  Logs.bk
drwxrwxr-x 1 plex plex 34 Sep  8 13:24  Logs

Yeah, what’s LD_LIBRARY_PATH set to when running it that way?

https://support.plex.tv/articles/201242707-plex-media-scanner-via-command-line/

Here’s a forum search of “docker ld_library_path” with some additional threads and references.

LD_LIBRARY_PATH=/usr/lib/plexmediaserver/lib is what is set

Running the scanner via strace I can see the dir being called:
[pid 59881] stat("/config/Library/Logs/Plex Media Server", <unfinished ...>

Ok I think I figured it out:
If PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR is not set it will produce the above result.

Oh good! I was just coming back here to mention that variable too.