# Plex scanner cli log location change?

**URL:** <https://forums.plex.tv/t/plex-scanner-cli-log-location-change/809927>\
**Category:** Plex Media Server\
**Tags:** server-linux, server-docker\
**Created:** [September 8, 2022, 2:45pm UTC](https://forums.plex.tv/t/plex-scanner-cli-log-location-change/809927 "2022-09-08T14:45:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![EnorMOZ](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@EnorMOZ](https://forums.plex.tv/u/EnorMOZ)\
**Post date:** [September 8, 2022, 2:45pm UTC](https://forums.plex.tv/t/plex-scanner-cli-log-location-change/809927/1 "2022-09-08T14:45:34Z")

</div>

I just realized the location of the cli scanner logs are now different than the plex [server log](https://support.plex.tv/articles/200250417-plex-media-server-log-files/) 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 🤦‍♂️

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

---

<div class="post-metadata">

**Author:** ![FordGuy61](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@FordGuy61](https://forums.plex.tv/u/FordGuy61)\
**Post date:** [September 8, 2022, 4:57pm UTC](https://forums.plex.tv/t/plex-scanner-cli-log-location-change/809927/2 "2022-09-08T16:57:07Z")

</div>

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`.

---

<div class="post-metadata">

**Author:** ![Volts](https://avatars.discourse-cdn.com/v4/letter/v/a5b964/32.png) [@Volts](https://forums.plex.tv/u/Volts)\
**Post date:** [September 8, 2022, 5:10pm UTC](https://forums.plex.tv/t/plex-scanner-cli-log-location-change/809927/3 "2022-09-08T17:10:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![EnorMOZ](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@EnorMOZ](https://forums.plex.tv/u/EnorMOZ)\
**Post date:** [September 8, 2022, 5:29pm UTC](https://forums.plex.tv/t/plex-scanner-cli-log-location-change/809927/4 "2022-09-08T17:29:04Z")

</div>

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

```auto
drwxrwxr-x 1 plex plex 34 Nov 5 2018 Logs.bk
drwxr-xr-x 1 plex plex 34 Sep 8 13:20 Logs

```

```auto
# 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:

```auto
# 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

```

---

<div class="post-metadata">

**Author:** ![Volts](https://avatars.discourse-cdn.com/v4/letter/v/a5b964/32.png) [@Volts](https://forums.plex.tv/u/Volts)\
**Post date:** [September 8, 2022, 5:32pm UTC](https://forums.plex.tv/t/plex-scanner-cli-log-location-change/809927/5 "2022-09-08T17:32:18Z")

</div>

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/](https://support.plex.tv/articles/201242707-plex-media-scanner-via-command-line/)

[Here’s](https://forums.plex.tv/search?q=docker%20ld_library_path) a forum search of “docker ld\_library\_path” with some additional threads and references.

---

<div class="post-metadata">

**Author:** ![EnorMOZ](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@EnorMOZ](https://forums.plex.tv/u/EnorMOZ)\
**Post date:** [September 8, 2022, 5:36pm UTC](https://forums.plex.tv/t/plex-scanner-cli-log-location-change/809927/6 "2022-09-08T17:36:16Z")

</div>

`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 ...>`

---

<div class="post-metadata">

**Author:** ![EnorMOZ](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@EnorMOZ](https://forums.plex.tv/u/EnorMOZ)\
**Post date:** [September 8, 2022, 5:52pm UTC](https://forums.plex.tv/t/plex-scanner-cli-log-location-change/809927/7 "2022-09-08T17:52:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Volts](https://avatars.discourse-cdn.com/v4/letter/v/a5b964/32.png) [@Volts](https://forums.plex.tv/u/Volts)\
**Post date:** [September 8, 2022, 5:54pm UTC](https://forums.plex.tv/t/plex-scanner-cli-log-location-change/809927/8 "2022-09-08T17:54:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 7, 2022, 5:54pm UTC](https://forums.plex.tv/t/plex-scanner-cli-log-location-change/809927/9 "2022-12-07T17:54:52Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
