Does the OS X log notifications from the Notification Center?

Solution 1:

This is an old question, but just in case someone stumbles on it and is specifically worried about the privacy implications of Notification Center, the answer is YES, OS X does keep a log of notifications on disk.

The format is an sqlite database, and it can be found inside this folder:

~/Library/Application Support/NotificationCenter

Inside you'll find at least one .db file for your account, i've seen some that OS X apparently considered corrupt at one point, so they're called .db.corrupt.

Running the strings command on this file will show you a load of binary data, quite a few "NSSomething" class names, and yes, your iMessages, file paths, twitter and facebook notifications and anything else that was sent to Notification Center by an app or the system.

If you want to get rid of that file at a specific point in time, you can kill usernoted temporarily (it'll restart itself) and delete the file in one shot (run this as your user account, not with sudo):

killall usernoted && rm ~/Library/Application\ Support/NotificationCenter/*.db

This will, 99% of the time, catch usernoted while it's temporarily not running, successfully delete the old database, and usernoted will make a new empty one when it starts again.

This isn't a good solution if you're really worried about privacy, but aside from encrypting your system or using a ramdisk for that folder, there really isn't a solution.

Solution 2:

In Mac OSX (or macos) 10.10 and later, this file has moved. The filename isn't the same for everyone, so you need to do a tiny bit of sleuthing to find it:

  1. Launch 'Activity Monitor' (in /Applications/Utilities)
  2. Seach for the process usernoted, double-click it
  3. Go to the tab "Open files and ports"

It is in a /com.apple.notificationcenter/db subfolder under /private/var/folders.

(thanks to https://stackoverflow.com/questions/26754189/new-location-of-the-notification-center-db-file-in-10-10 for the new location!)