コード例 #1
0
        /// <summary>
        ///     Handle warning log
        ///     Used to default instance
        /// </summary>
        /// <param name="message">Warning message</param>
        /// <param name="identity">Insert identity if need found easy in logs</param>
        /// <param name="title">Custom title for log</param>
        /// <param name="customCallerPath">Custom caller path</param>
        /// <param name="customCallerName">Custom caller name</param>
        /// <param name="customLineNumber">Custom line number</param>

        #region G9LogWarning_Default

        public static void G9LogWarning_Default(this string message, string identity       = null, string title = null,
                                                [CallerFilePath] string customCallerPath   = null,
                                                [CallerMemberName] string customCallerName = null,
                                                [CallerLineNumber] int customLineNumber    = 0)
        {
            G9Logging.G9LogWarning(message, identity, title, customCallerPath, customCallerName, customLineNumber);
        }
コード例 #2
0
        public void CheckInsertThousandLogWithCustomConfigAndEncryption()
        {
            // Test for 1 million log
            for (var index = 0; index < 1000; index++)
            {
                // Event
                Logging.G9LogEvent($"Event {index}", $"Event {index}", $"Event {index}");
                // Information
                Logging.G9LogInformation($"Information {index}", $"Information {index}", $"Information {index}");
                // Warning
                Logging.G9LogWarning($"Warning {index}", $"Warning {index}", $"Warning {index}");
                // Error
                Logging.G9LogError($"Error {index}", $"Error {index}", "Error");
                // Exception And Inner Exception
                Logging.G9LogException(
                    new Exception("Exception", new Exception("Exception", new Exception("Exception"))), $"Exception {index}",
                    $"Exception {index}", $"Exception {index}");
            }
            ;

            Thread.Sleep(10000);
        }