示例#1
0
        private const string ProjectId = "pacific-wind";  // TODO: use Api.Gax... like what log4net does.

        static public string WriteRandomEntry()
        {
            var msg = RandomString.Next();

            WriteEntry(msg);
            return(msg);
        }
示例#2
0
        public static void WriteRandomSeverityLog(ILog log)
        {
            string message = RandomString.PickMessage();

            switch (rand.Next(6))
            {
            case 0:
                log.Info(message);
                break;

            case 1:
                log.Debug(message);
                break;

            case 2:
                log.Error(message);
                break;

            case 3:
                log.Fatal(message);
                break;

            case 4:
                log.Warn(message);
                break;

            case 5:
                log.Info(RandomString.Next());
                break;
            }
        }
示例#3
0
 public static void WriteException(ILog logger)
 {
     logger.Error(RandomString.Next(), new Exception(RandomString.Next()));
 }