1. Домой
  2. Документы
  3. Smarty (English version)
  4. Smarty configuring and management
  5. Setting up logging

Setting up logging

The following options can be set in the Smarty configuration file:

  • LOG_FILE_OWNER_USER — username of the log files owner. Data type: string. Default is www-data.
  • LOG_FILE_OWNER_GROUP — group name of the log files owner. Data type: string. Default is www-data.
  • LOGGING — logging configuration. Data type: dict.

Example of changing standard logging levels:

LOGGING[‘loggers’][‘smarty_content_requests’][‘level’] = ‘ERROR’
LOGGING[‘loggers’][‘smarty_accounts’][‘level’] = ‘INFO’
LOGGING[‘loggers’][‘smarty_messaging’][‘level’] = ‘ERROR’
LOGGING[‘loggers’][‘clever_cache’][‘level’] = ‘INFO’
LOGGING[‘loggers’][‘smarty_api_requests’][‘level’] = ‘ERROR’
LOGGING[‘loggers’][‘smarty_stream_services’][‘level’] = ‘ERROR’
LOGGING[‘loggers’][‘smarty_billing_out’][‘level’] = ‘DEBUG’
LOGGING[‘loggers’][‘smarty_billing_in’][‘level’] = ‘DEBUG’
LOGGING[‘loggers’][‘smarty_main’][‘level’] = ‘ERROR’

Logging level variations: DEBUG, INFO, WARNING, ERROR, CRITICAL. Depending on the level, the amount of logged information changes (from DEBUG — debugging information to CRITICAL — only messages about critical errors).

List of all loggers:

  • smarty_accounts_handler — information about account authorization attempts and actions with accounts.
  • smarty_billing_out_handler — requests to external billing via External API.
  • smarty_billing_in_handler — requests to the Billing API from outside.
  • smarty_payment_handler — requests to payment gateways.
  • smarty_portal_handler — portal logs.
  • smarty_epg_handler — EPG-related logs.
  • smarty_admin_handler — logging actions and data changes in the control panel.
  • smarty_content_requests_handler — logging requests for content and generated URLs.
  • smarty_api_requests_handler — logging requests to the API and the results of method processing.
  • smarty_messaging_handler — logging of message sending.
  • smarty_management_handler — logging of service and regular commands.
  • smarty_cache_handler — logging of caching and invalidation operations.
  • smarty_main_handler — logging of main operation errors (here you can also find detailed stack traces and descriptions of errors like 500 Server Error).
  • smarty_stream_services_handler — logging the results of the algorithm for selecting streaming services for a specific account.
  • smarty_videoservices_handler — logging requests to video server APIs.
  • smarty_sms_handler — logging operations of interaction with SMS gateways.
  • smarty_rq_handler — logging the execution of cluster operations (Redis Q).
  • smarty_device_monitoring_handler — logging operations of the device monitoring module (MVision).
  • smarty_ws_api_handler — logging of WindyCast module operations.
  • smarty_custom_handler — custom logs (usually used in custom integration modules developed individually for operators).
  • smarty_megogo_handler — logging operations of the integration module with MEGOGO.
  • smarty_tvzavr_handler — logging operations of the integration module with TVZavr.
  • smarty_hbb_handler — logging operations of the integration module with HBB providers.
  • smarty_ads_handler — logging operations of the integration module with advertising providers.
  • smarty_irdeto_handler — logging operations of the integration module with Irdeto KMS.

The default logging level for all loggers is DEBUG. In order to optimize disk space consumption and increase performance, it is recommended to adjust the logging level according to your needs and reduce it for unused logs.

Path for saving logs /var/log/microimpuls/smarty.