Console - вывод в консоль (если процесс запущен не как демон, иначе логи будут сохраняться в директорию /dev/null)
Syslog - вывод в системный лог (/var/log/messages)
File - вывод в отдельный файл (директория для создания файла указана в параметре DefaultDirectory)
DefaultDirectory
Директория, для лог-файлов
Descriptions
Описание формата для каждого типа логирования и специфичных настроек
В каждом из типов логирования настраиваются общие параметры:
Destination - тип бэкенда
Format - правила форматирования сообщения:
Severity - уровень логирования
LineID - cтрока в коде где было вызвано данное сообщение
ProcessID - PID
ThreadID - TID
Channel - имя логгера, через который было выведено данное сообщение
Message - текст сообщения
TimeStamp - время генерации сообщения
Filter - правила фильтрации сообщения
Asynchronous - является ли бэкенд асинхронным. При асинхронном режиме работы фактическая запись сообщения в бэкенд будет произведена когда-то после обработки сообщения системой логирования (сообщение будет поставлено в очередь и когда-то потом выведено в консоль/syslog/файл). Это означает, что если сразу после обработки сообщения системой логирования программа зависнет, то есть очень большая вероятность, что сообщение в лог никогда не попадёт (его не успеют записать). Плюс асинхронности - более быстрая обработка сообщений (основной код программы тратит меньше времени на обработку сообщений). Имеет смысл выставлять в true только тогда, когда необходимо очень интенсивное логирование, и при этом надежность программы не вызывает вопросов. Во всех остальных случаях стоит ставить false.
Специфичный бэкенд для Console и File:
AutoFlush - выводится ли сообщение на экран сразу или ожидает в буфере. При значении параметра false эффект примерно такой же, как от параметра Asynchronous=true (см. выше).
Специфичные бэкенды для File:
Append - добавлять ли сообщения к старому файлу или сделать на его месте новый при старте программы.
FileName - название файла, куда будет писаться лог.
GlobalLevel
Глобальный уровень логирования. Рекомендуемое значение при внедрении – error. Такая настройка позволит записывать в лог только сообщения уровня error и выше (criticalfatal). Значение при штатной эксплуатации и по умолчанию - warning, т.е. в логи записываются только предупреждения и ошибки. Не рекомендуется без особой необходимости использовать значение trace
SuppressExceptions
Подавлять ли исключения в механизме логирования.
Core
Общие настройки ядра логирования
DisableLogging
Возможность полного отключения логирования в компоненте. Отключение происходит после первых 3 этапов прохождения сообщения через систему логирования, т.к. эти этапы происходят "снаружи" системы логирования и не регулируются данной настройкой.
Loggers
Содержит логгеры разных программных компонентов, где ключ - имя логгера, а значение - уровень логирования. Разделение на логгеры реализовано с целью тонкой настройки сообщений для логирования.
Indexer - операции с конфигурационным файлом демона searchd: индексирование, управление файлами индексов и самим демоном
Root - корневой логгер, отвечающий за чтение из БД, создание индексов, архивирование, удаление индексов
Stat - сообщения со статистическими данными (время выполнения различных операций)
Возможные значения уровней логирования (Severity):
trace - наиболее подробное логирование (включаются все сообщения с уровнями debug, info и выше)
debug - вывод отладочной информации, обычно для диагностики ошибок и общения с разработкой/поддержкой
info - информационные сообщения, могут быть отключены на стабильной системе
warning - предупреждения
error - ошибки
fatal - наиболее важные сообщения, приводящие к завершению работы или отказу.
Информация
title
Пример:
Из двух значений выбирается самое "строгое", т.е. если GlobalLevel = warning, Stat = info => эффективное значение для Stat = warning (ограничено глобальным уровнем)
Информация
title
Примечание:
Если у вас возникла необходимость включить отладку процесса, используйте параметр DebugBreak. Значение по умолчанию - false. Редактирование параметра без контроля сотрудника InfoWatch не рекомендуется.
Sv translation
language
en
The Logging section defines logs outputconfiguration of logging.
Setting
Description
Backends
Description of backends
DefaultDirectory
Directory with log files
ActiveBackends
Configuring output for log filesoutput. Possible values. The following types of logging (backends) are supported:
Console - output to the console (if the process is running not as a daemon, otherwise logs will be saved to the /dev/nulldirectory)
Syslog - output to the system log (/var/log/messages)
File - output to the individual a separate file (the file directory of this file is specified in the DefaultDirectoryparameter)
DefaultDirectory
The path to the directory containing log files
Descriptions
Format A description of format for each logging type and specific settings
For each type of logging, common settings
GlobalLevel
Global level of logging. If the warning value is set then log will contain only messages with warning level and higher
DisableLogging
Possibility of total disabling of the logging for the componentare configured:
Destination - the backend type
Format - rules of generating a message:
Severity - the logging level
LineID - a line in the code where the message is called
ProcessID - PID
ThreadID - TID
Channel - a name of the logger through which the message was output
Message - the message text
TimeStamp - the time of generating a message
Filter - rules for message filtering
Asynchronous - whether the backend is asynchronous. In the asynchronous mode, the message is written to backend only after it is processed by the logging system (the message is queued and then output to console, syslog, or file ). It means that in case of the program crash, the message probably will not be logged. In the asynchronous mode, messages are processed faster. Should be set to True only if you need detailed logging. Otherwise, we recommend setting this parameter to False.
Backends which are specific for Console and File:
AutoFlush - whether the message is displayed immediately or awaits in the clipboard. When the value is False, the program operates almost the same way as with the Asynchronous parameter set to True (see above).
Specific backends for File:
Append - whether to append messages to an existing file or create a new file when the program is started;
FileName - a name of the file to which the log will be written.
GlobalLevel
Global level of logging. The recommended value during the System implementation is error. With this setting, only messages with error and fatal level are logged. When using the System, the default value is warning which enabled logging only warnings and errors. We recommend not using the trace value without a necessity.
SuppressExceptions
Whether to suppress exceptions in the logging mechanism
Core
Common settings of the logging core
DisableLogging
Possibility to completely disable logging for the component. Logging can be disabled after the message passes three stages of the logging system as those stages are outside the System and this setting does not affect them.
Loggers
Contains loggers of different program components, where the key is the logger name and the value is the logging level. Different loggers allow you to configure logging messages more flexibly.
Cachets -configuring the logging subsystem which uploads/unloads cached trees
InfoCollector - configuring the logging subsystem which collected information on the System
Integrity -configuring the logging subsystem which checks/enables data integrity
Scan - configuration of the logging subsystem for scanning folders
DB - DB logger
Devour - building XMLPIPE2 files for Indexer
Indexer - операции с конфигурационным файлом демона searchd: индексирование, управление файлами индексов и самим демоном
Root - a root logger which is responsible for reading data from DB, creating indexes, archiving, deleting indexes
Stat - messages with statistical data (execution time for different operations)
Possible logging values (Severity):
trace - the most detailed logging (includes all messages with the level debug, info, and higher)
debug - output of debug information, can be required when contacting technical supportй
info - informational messages, can be disabled if the System is stable
warning - warnings
error - errors
fatal - the most important messages which result in the System crash
Example:
From the two values, the "stricter" one is chosen. If GlobalLevel = warning, Stat = info , then an effictive value for Stat = warning (is restricted by the global level)
Информация
title
Note:
In case you need to debug the process, use DebugBreak parameter. Default The default value is false. It is not recommended to edit We recommended not editing this parameter without InfoWatch employee's control.