예제 #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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        /// <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);
        }