Example #1
0
        public static void WriteLine(string message, [CallerFilePath] string sourceFilePath = "", [CallerMemberName] string memberName = "", [CallerLineNumber] int sourceLineNum = 0)
        {
            string messageFormatted = string.Format("{0}.{1}({2}):{3}", System.IO.Path.GetFileNameWithoutExtension(sourceFilePath), memberName, sourceLineNum, message);

            Trace.WriteLine(messageFormatted);
            if (logFile != null)
#if WINDOWS_UWP
            { logFile.WriteString(messageFormatted + Environment.NewLine); }
#else
            { logFile.WriteLine(messageFormatted); }
#endif
        }