示例#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);
        }
示例#2
0
 public void Log(string message, Category category, Priority priority)
 {
     LoggerFacade.Log(message, category, priority);
 }
示例#3
0
 public void LogEnd(string message, Category category, Priority priority, string propertyName = null)
 {
     LoggerFacade.LogEnd(message, category, priority, propertyName);
 }