What are in my logs and error reports?
When PhotoStructure encounters errors, it may automatically send a report to our error system, Sentry.
These error help us determine both what resulted in the error, and how to resolve it in the future.
What’s included in an error report? đź”—
- Operating system (macOS, Linux distribution, Windows) and version
- Hardware information (RAM free/used, and CPU make/model)
- Mounted volume metadata (mount points, free/used, and if the volume is remote)
- Recent health check results (viewable in the “About” page)
- Your email address, only if you’ve provided it via the
email
library setting. - Context around the error
- Recent log messages
What are in log messages? đź”—
Log messages can (but do not always) include:
- Names of files and directories that are being synchronized
- File metadata extracted during synchronization
- System metadata (OS, version, and hardware metadata)
What’s not included in error reports? đź”—
Error reports never include actual image content from any of your photos and videos.
PhotoStructure also uses Sentry’s enhanced privacy and data scrubbers for all error reports.
What’s actually sent? đź”—
A JSON file with the full error report payload is saved into your events
directory on your local disk when error reports are sent.
%APPDATA%\PhotoStructure\events
on Windows,$HOME/Library/Application Support/PhotoStructure/events
on macOS, and$HOME/.config/Photostructure/events
on Linux
How frequently are these sent? đź”—
Only unexpected or internal errors result in an error report. Ideally, these events are rare.
PhotoStructure limits the number of error reports sent per day, via the maxErrorsPerDay
library
setting. The default is 3 events per day.
How to opt out of sending error reports đź”—
You can opt out of all error reporting via advanced
settings. Shut down PhotoStructure, open your library
settings, set reportErrors
to false
, save your changes, and restart
PhotoStructure.
As of version 0.9.1, the settings page also allows you to easily opt-out of error reporting.
Log levels đź”—
error
(the default, only egregious problems)warn
(minor and expected errors)info
(verbose high-level execution paths, impacts performance)debug
(extremely verbose, substantively impacts performance)
What happens if I change my log level? đź”—
If you change your log level, PhotoStructure will write tracing and debug information to log files in your logging directory.
Note that PhotoStructure only sends log excerpts if reportErrors
is true, and
there is an error.
How to manually send your logs đź”—
If you’ve been asked to manually send in logs, first off: thank you for your time and assistance, and our apologies if PhotoStructure is misbehaving for you.
Step 1: Shut down PhotoStructure đź”—
Make sure PhotoStructure is shut down.
Step 2: Set logLevel
to info
đź”—
Edit your logLevel
setting to be info
. It’s probably easiest to do this via environment variables:
For PhotoStructure for Desktops on macOS đź”—
- Open Terminal.app (hit
command +space , typeterminal
, then tapreturn ) - Type
launchctl setenv PS_LOG_LEVEL info
- Tap
return
For PhotoStructure for Desktops on Windows đź”—
- Tap the
Windows key, type “environment”, select “Edit the system environment vairables” control panel - Click the
Environment Variables...
button in the bottom right - Click the
New...
button in the topUser variables for ___
pane - In “Variable name:” enter
PS_LOG_LEVEL
- In “Variable value:” enter
info
- Click
OK
, thenOK
, thenOK
.
For other platforms đź”—
Consult the environment variables page to set PS_LOG_LEVEL=info
Step 3: Start PhotoStructure and reproduce the error đź”—
If this involves sync problems, just let it run for a couple minutes.
Then shut down PhotoStructure.
Step 4: Open your log directory đź”—
The default log directory is
$HOME/Library/Logs/PhotoStructure
on macOS,%APPDATA%\PhotoStructure\logs
on Windows,$HOME/.cache/photostructure/logs
on Linux, and/ps/library/.photostructure/logs
on Docker
On recent versions of PhotoStructure, this path is shown on the About page.
If you’re on macOS, note that the Finder hides the Library
folder by default.
It may be easier to open a terminal window (see above), and run open "$HOME/Library/Logs/PhotoStructure"
. A Finder window should open for this folder.
If you’re on Windows, note that the File Explorer hides the %APPDATA%
directory by default. It may be easier to open a command prompt (tap
start "%APPDATA%\PhotoStructure\logs"
. A File Explorer window should open for this
directory.
Step 5: Compress and email your logs đź”—
- Right-click the folder with the current date
- Select “create archive” or “compress…”
- Send us the zipfile or
.tar.xz
archive via email or any other method available to you (Dropbox, OneDrive, Google Drive, iCloud, …)
Step 6: Restore the prior log level đź”—
After sending us your logfiles, please reset your log level back to either
warn
, or the default value of error
, to preserve disk space. Logging at
info
or debug
levels also adversely impacts PhotoStructure’s performance.
Step 6 for PhotoStructure for Desktops on macOS đź”—
- Open Terminal.app (hit
command +space , typeterminal
, then tapreturn ) - Type
launchctl unsetenv PS_LOG_LEVEL
- Tap
return
Step 6 for PhotoStructure for Desktops on Windows đź”—
- Tap the
Windows key, type “environment”, select “Edit the system environment vairables” control panel - Click the
Environment Variables...
button in the bottom right - Click the line with
PS_LOG_LEVEL
- Click
Delete
- Click
OK
, thenOK
, thenOK
.
Step 6 for other platforms đź”—
Run unset PS_LOG_LEVEL
in any existing shell. If you used docker-compose
,
remove the environment
line in your docker-compose.yml
and restart your
container.