public bool WriteException(Exception ex, string correlation, bool writeErrorLog = false, string message = null, Dictionary <string, object> exceptionParams = null)
        {
            try
            {
                LogEngine.SendException(ex, correlation);

                if (writeErrorLog)
                {
                    WriteLog(LogLevels.ERROR, string.IsNullOrWhiteSpace(message) ? ex.ToString() : $"{message}\n{ex}", correlation, exceptionParams);
                }
            }
            catch //error on logengine must be not send application in error
            {
                return(false);
            }
            return(true);
        }