123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- using Newtonsoft.Json;
- using NLog;
- using RestSharp;
- using System;
- using System.Collections.Generic;
- using System.Configuration;
- using System.IO;
- using System.Linq;
- using System.Security.Cryptography.X509Certificates;
- using System.Text;
- using System.Threading.Tasks;
- using System.Xml.Serialization;
- namespace WayneCloud.Models
- {
- public static class ExtentionMethod
- {
- private static readonly NLog.Logger Logger = NLog.LogManager.GetLogger("Main");
- //在网站根目录下创建日志目录
- /**
- * 向日志文件写入调试信息
- * @param className 类名
- * @param content 写入内容
- */
- public static void Debug(string className, string content)
- {
- Logger.Debug(className + ": " + content);
- }
- /**
- * 向日志文件写入运行时信息
- * @param className 类名
- * @param content 写入内容
- */
- public static void Info(string className, string content)
- {
- Logger.Info(className + ": " + content);
- }
- /**
- * 向日志文件写入出错信息
- * @param className 类名
- * @param content 写入内容
- */
- public static void Error(string className, string content)
- {
- Logger.Error(className + ": " + content);
- }
- }
- }
|