• Mac OS X,  Mac OS X Server,  Mac Security

    Logs, Logging, And Logger (Oh My)!

    Apple has a number of different logging APIs. For the past few releases, Apple has tried to capture everything possible in logs, creating what many administrators and developers might consider to be a lot of chatter. As such, an entirely new interface needed to be developed to categorize and filter messages sent into system logs. Writing Logs The logger command is still used to create entries in system logs. However, if you are then using tail to view /var/log/system.log then you will notice that you no longer see your entry being written. This is because as the logs being created in macOS have gotten more complex, the tools to read…

  • Mac OS X

    macOS Logging Subsystems In A Gist

    If you happen to be tweaking the macOS subsystems for logging, I’ve put them into a little python class. If you need it, find it at this gist: https://gist.github.com/krypted/495e48a995b2c08d25dc4f67358d1983 Could use an array of all the levels, TTLs, and options. But I’ll get to that when I get some time. If this is all you need, though: class Logging(object): __name__ = 'logger.info(1)' plist = '/System/Library/Preferences/Logging/Subsystems/' def __init__(__name__, plist, *args, **kwargs): super(getLogger/, self).__init__() logger.info('Input parameters:\n' 'accessibility: "{com.apple.Accessibility.plist}"\n' 'StandaloneHIDFudPlugins: "{com.apple.StandaloneHIDFudPlugins.plist}"\n' 'duetactivityscheduler: "{com.apple.duetactivityscheduler.plist}"\n' 'passkit: "{com.apple.passkit.plist}"\n' 'AppKit: "{com.apple.AppKit.plist}"\n' 'SystemConfiguration: "{com.apple.SystemConfiguration.plist}"\n' 'eapol: "{com.apple.eapol.plist}"\n' 'persona: "{com.apple.persona.plist}"\n' 'AppleIR: "{com.apple.AppleIR.plist}"\n' 'TCC: "{com.apple.TCC.plist}"\n' 'icloudpreferences: "{com.apple.icloudpreferences.plist}"\n' 'apple.pf: "{com.apple.pf.plist}"\n' 'AssetCache: "{com.apple.AssetCache.plist}"\n' 'TimeMachine: "{com.apple.TimeMachine.plist}"\n' 'internetAccounts: "{com.apple.internetAccounts.plist}"\n' 'photoanalysisd.graph: "{com.apple.photoanalysisd.graph.plist}"\n' 'AssetCacheServices: "{com.apple.AssetCacheServices.plist}"\n' 'Transport: "{com.apple.Transport.plist}"\n'…

  • Apple Configurator,  iPhone

    Increase The Logging Level Of Apple Configurator

    Apple Configurator, by default, logs only a limited amount of data. To increase the logging level for Apple Configurator, use the defaults command to write All into the LogLevel key in com.apple.configurator, using the defaults command: defaults write com.apple.configurator LogLevel ALL Re-open Apple Configurator and you’re golden. Then, have some problems and be so happy to get some logs, viewable in Console. defaults read com.apple.configurator {AcceptedLicenseVersion = 20150317; CDFirstLaunch = 0; CDMainViewType = 3; ChaperoneCertificateIssuer = ; ChaperoneCertificateSerial = ; LogLevel = ALL; NSNavLastRootDirectory = "~/Desktop"; NSNavPanelExpandedSizeForSaveMode = "{712, 620}"; "NSToolbar Configuration C484E2C8-5B9C-4999-9304-7233D38B3F95" = { "TB Display Mode" = 1; "TB Icon Size Mode" = 1; "TB Is Shown" =…

  • Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment,  Xsan

    Yosemite Server And Logs

    OS X Yosemite running the Server app has a lot of scripts used for enabling services, setting states, changing hostnames and the like. Once upon a time there was a script for OS X Server called server setup. It was a beautiful but too simplistic kind of script. Today, much of that logic has been moved out into more granular scripts, kept in /Applications/Server.app/Contents/ServerRoot/System/Library/ServerSetup, used by the server to perform all kinds of tasks. These scripts are, like a lot of other things in Yosemite Server. Some of these include the configuration of amavisd, docecot and alerts. These scripts can also be used for migrating services and data. Sometimes the…

  • Active Directory,  Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment,  Windows Server

    Mac OS X: Directory Services Debug Log

    When you’re trying to troubleshoot issues with Directory Services on Mac OS X sometimes the best thing you can do is put the directoryservices daemon into debug mode. To do so you would use the following command: killall -USR1 Directory Service By default errors get trapped into this file: /Library/Logs/DirectoryService/DirectoryService.error.log But when in debug mode using -USR1 you can see more specific errors in the /Library/Logs/DirectoryService/DirectoryService.error.log file.  You can then use commands such as tail in conjunction with grep in order to isolate issues to specific strings such as ADPlugin. If you choose to use -USR2 for debugging then the logs will get written into the /var/log/system.log file. To disable verbose…