The DNS service uses nf, located in /etc to set log levels and has no serveradmin settings for doing so. The dirserv (aka Open Directory) uses the slapconfig back-end, so I use slapconfig to increase logging: Nor does its migration script ( /Applications/Server.app/Contents/ServerRoot/System/Library/ServerSetup/MigrationExtras/80-devicemgrmigration.sh ) point to any increased logging during migration.
![using macos server 5.5 using macos server 5.5](https://i0.wp.com/tech-story.net/wp-content/uploads/2022/06/J.River-Media-Center.-2.jpg)
Profile Manager is called devicemgr in the serveradmin interface and I’ve found no way to augment the logging levels. You can changing either by changing what comes after the = sign. Sudo serveradmin settings calendar:ErrorLogFile=error.log Sudo serveradmin settings calendar:LogRoot=/var/log/caldavd
![using macos server 5.5 using macos server 5.5](https://images.downloadcloud.com/wp-content/uploads/2016/07/iDNS-for-Mac.jpg)
Sudo serveradmin settings calendar:DefaultLogLevel = “warn” Similar to address book, the caldav server uses DefaultLogLevel to set how much data gets placed into logs: There are no further controls for the verbosity of the afp logs. The events that trigger log entries are in the afp:loggingAttributes array and are all enabled by default. Sudo serveradmin settings afp:activityLog = yes The activity log is disabled by default and enabled using the command: Sudo serveradmin settings afp:activityLogPath = “/Library/Logs/AppleFileService/AppleFileServiceAccess.log” The second location logs activities (open file, delete file, etc) rather than errors and is /Library/Logs/AppleFileService/AppleFileServiceAccess.log, defined using: Sudo serveradmin settings afp:errorLogPath = “/Library/Logs/AppleFileService/AppleFileServiceError.log” The first is with errors to the service, using /Library/Logs/AppleFileService/AppleFileServiceError.log, the path designated in the following: You can change either by changing what comes after the = sign. Sudo serveradmin settings addressbook:ErrorLogFile=error.log Sudo serveradmin settings addressbook:LogRoot=/var/log/caldavdĪnd the following, which sets the file name in that directory: This by defualt logs to /var/log/caldavd/error.log, which is built based on the following, which sets the base: Sudo serveradmin settings addressbook:DefaultLogLevel = “warn” So let’s look alphabetically, starting with Address Book: To do this, it looks like we’re going service-by-service. But what I haven’t seen in all of these logs is bumping up the logging level for services before performing tasks, so that you can see a verbose output of what’s going on. This is also where I learned that Apple had put an Open Directory backup script in /Applications/Server.app/Contents/ServerRoot/usr/libexec/server_backup/opendirectorybackup (that still requires a password).
![using macos server 5.5 using macos server 5.5](https://downloadly.ir/wp-content/uploads/2019/04/Wireshark1.jpg)
One of the things that can can be useful about the scripts scattered throughout the Server app is to learn how the developers of macOS Server intend for certain tasks to occur. However, you can also use the Console app from /Applications/Utilities, as with any other Mac, to look at standard logs. The dropdown at the bottom of the screen provides quick access to service-based logs.
![using macos server 5.5 using macos server 5.5](https://www.applegazette.com/wp-content/uploads/2017/03/server-macos-configure-20.png)
The easiest way to view logs is to use the Server app, clicking on Logs in the sidebar. And the scripts tend to change year over year/release over release. Sometimes the scripts are in bash, sometimes ruby, sometimes perl and other times even python. These scripts can also be used for migrating services and data. Some of these include the configuration of amavisd, docecot and alerts. These scripts are, like a lot of other things in OS X Server. 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. It was a beautiful but too simplistic kind of script. Once upon a time there was a script for macOS Server 5.2 called serversetup. MacOS Sierra (10.12) running the Server app has a lot of scripts used for enabling services, setting states, changing hostnames and the like.