When the --output option is specified for the sm_notify command, each notifier stores its working history in a log file. Every time a notifier starts, when errors occur, or when the connection with a Global Manager is lost, the notifier writes information to the log file.

Each notifier writes its log file to BASEDIR/smarts/local/logs. When the notification notifiers run on the same machine, specify a unique name for the log file of each notifier.

All log files have a .log file type. The default name of a log file is based on the program’s name. For a notification adapter, the default name of the log file is sm_notify.log. To change the default name, specify a filename with the --output option for the sm_notify command. For example, for an Email Notifier Adapter, specify --output=MailAdapter and the name of the log will be MailAdapter.log.

software can maintain up to 1,000 different copies of backup log files. The number of saved log files is determined by the value of the SM_BACKUP_FILE_LIMIT environment variable. When an adapter starts up, it renames a file that matches its log filename and adds a .bak to the name (for example, MailAdapter.log to MailAdapter.log.bak). If a file with this name already exists, it is renamed MailAdapter.log.bak.NNN, and a new MailAdapter.log.bak is created. By default, programs save two log files, which do not include the active log file.