Exemple #1
0
        public LogMessage(Log log, string message, Exception ex)
        {
            if (string.IsNullOrWhiteSpace(message))
            {
                if (ex != null)
                {
                    message = ex.Message;
                }
                else
                {
                    message = "NULL";
                }
            }

            LogMessageText = new LogMessageLookup(message);

            if (ex != null)
            {
                LogStackTrace = new LogStackLookup(ex.StackTrace);
            }

            Depth = 0;

            if (log.LogMessages != null)
            {
                Depth = log.LogMessages.Count;
            }

            OwnerLog = log;
        }
Exemple #2
0
        public LogMessage(Log log, string message)
        {
            if (string.IsNullOrWhiteSpace(message))
            {
                message = "NULL";
            }

            LogMessageText = new LogMessageLookup(message);

            Depth = 0;

            if (log.LogMessages != null)
            {
                Depth = log.LogMessages.Count;
            }

            OwnerLog = log;
        }