code: func (app *App) configureLogHook(configuration *configuration.Configuration) {
  	entry, ok := dcontext.GetLogger(app).(*logrus.Entry)
  	if !ok {
  		// somehow, we are not using logrus
  		return
  	}
  
  	logger := entry.Logger
  
  	for _, configHook := range configuration.Log.Hooks {
  		if !configHook.Disabled {
  			switch configHook.Type {
  			case "mail":
  				hook := &logHook{}
  				hook.LevelsParam = configHook.Levels
  				hook.Mail = &mailer{
  					Addr:     configHook.MailOptions.SMTP.Addr,
  					Username: configHook.MailOptions.SMTP.Username,
  					Password: configHook.MailOptions.SMTP.Password,
  					Insecure: configHook.MailOptions.SMTP.Insecure,
  					From:     configHook.MailOptions.From,
  					To:       configHook.MailOptions.To,
  				}
  				logger.Hooks.Add(hook)
  			default:
  			}
  		}
  	}
  }
docs: // configureLogHook prepares logging hook parameters.