Beispiel #1
0
        public static void Trace(this ILog log, CallerInformation callerInformation, string format, params object[] args)
        {
            Assert.IsNotNull(log, nameof(log));
            Assert.IsNotNull(callerInformation, nameof(callerInformation));
            var message = string.Format(format, args);

            log.Trace(callerInformation, message);
        }
        public static void Trace(this ILog log, CallerInformation callerInformation, string message)
        {
            Assert.IsNotNull(log);
            Assert.IsNotNull(callerInformation);

            var messageWithCallerInformation =
                $"CallerInformation: {callerInformation.CallerMemberName},{callerInformation.CallerFilePath},{callerInformation.CallerLineNumber}\r\n{message}";

            log.Trace(messageWithCallerInformation);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="log"></param>
        /// <param name="callerInformation"></param>
        /// <param name="format"></param>
        /// <param name="args"></param>
        public static void Trace(
            this ILog log,
            CallerInformation callerInformation,
            string format,
            params object[] args)
        {
            var message = string.Format(format, args);

            log.Trace(callerInformation, message);
        }