Exemple #1
0
        private void LogException(string handlerName, object exception)
        {
            Prism.Logging.Category category = Prism.Logging.Category.Exception;
            Prism.Logging.Priority priority = Prism.Logging.Priority.High;

            if (exception is ValidationException)
            {
                category = Prism.Logging.Category.Info;
                priority = Prism.Logging.Priority.Low;
            }

            var msg = string.Format("Application: {0}\n\rHandler: {1}\n\rException details:\r{2}",
                                    GetApplicationFriendlyName(),
                                    handlerName,
                                    exception.ToString());

            Logger.Log(msg, category, priority);
        }
Exemple #2
0
 public void Log(string message, Category category, Priority priority)
 {
     LoggerFacade.Log(message, category, priority);
 }
 public void LogEnd(string message, Category category, Priority priority, string propertyName = null)
 {
     LoggerFacade.LogEnd(message, category, priority, propertyName);
 }