# Lails.Log **Repository Path**: Lails/Lails.Log ## Basic Information - **Project Name**: Lails.Log - **Description**: 基于NLog并兼任阿里云日志的组件 - **Primary Language**: C# - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-06-14 - **Last Updated**: 2022-11-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Lails.Log #### 项目介绍 基于NLog并兼任阿里云日志的组件 Git:https://gitee.com/Lails_group/Lails.Log.git Nuget:nuget.lails.cc/nuget #### 安装教程 新建控制台程序项目,用Nuget引用Lails.Log包。 Install-Package Lails.Log #### 使用说明 1. NLog.config : NLog配置文件 2. NLog配置文件: nlog节点下设置enable为true 3. 阿里云日志启用及配置 alilog节点下设置enable为true 4. 示例 ~~~ Logger logger = new Logger(); logger.Debug("debug test", "user", "pay", "source"); logger.Debug("debug test", new Exception("debug exception")); logger.Error("error test"); logger.Error("error test", new Exception("error exception")); logger.Info("info test", "user", "pay", "source"); logger.Info("info test", new Exception("info exception"), "user", "pay", "source"); logger.Trace("trace test"); logger.Trace("trace test", new Exception("trace exception")); logger.System("system test"); logger.System("system test", new Exception("system exception")); ~~~ 5. Lails.Log.Manage部署 ~~~ 修改js文件夹下info.js文件中【baseUrl = 'http://localhost:59177'】地址为发布地址 ~~~