浏览代码

优化日志组建的路径,减小状态日志长度

yuzhengyang 7 年之前
父节点
当前提交
775d89ec7c

二进制
Fork.Net/.vs/Fork.Net/v15/Server/sqlite3/storage.ide


二进制
Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide


+ 3 - 3
Fork.Net/Azylee.Utils/Azylee.Core/AppUtils/AppInfoTool.cs

@@ -7,7 +7,7 @@ using System.Text;
 namespace Azylee.Core.AppUtils
 {
     public class AppInfoTool
-    { 
+    {
         /// <summary>
         /// 读取APP Processor(可读取App的CPU使用率)
         /// </summary>
@@ -25,7 +25,7 @@ namespace Azylee.Core.AppUtils
             return processor;
         }
         /// <summary>
-        /// 读取APP占用内存
+        /// 读取APP占用内存(单位:KB)
         /// </summary>
         /// <returns></returns>
         public static long RAM()
@@ -35,7 +35,7 @@ namespace Azylee.Core.AppUtils
             try
             {
                 p = Process.GetCurrentProcess();
-                value = p.WorkingSet64;
+                value = p.WorkingSet64 / 1024;
             }
             catch { }
             finally { p?.Dispose(); }

+ 56 - 7
Fork.Net/Azylee.Utils/Azylee.Core/LogUtils/SimpleLogUtils/Log.cs

@@ -18,10 +18,12 @@
 using Azylee.Core.DataUtils.CollectionUtils;
 using Azylee.Core.DataUtils.StringUtils;
 using Azylee.Core.IOUtils.DirUtils;
+using Azylee.Core.IOUtils.FileUtils;
 using Azylee.Core.IOUtils.TxtUtils;
 using System;
 using System.Collections.Concurrent;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
 using System.Runtime.InteropServices;
 using System.Threading;
@@ -43,12 +45,13 @@ namespace Azylee.Core.LogUtils.SimpleLogUtils
         //输出的 Log 格式
         const string LOG_FORMAT = "{0}  {1}  {2}";
         const string TIME_FORMAT = "HH:mm:ss.fff";
-        const string LOG_PATH = "Log";
+        const string LOG_PATH = "log";
+        const int CACHE_DAYS = 30;//缓存天数
 
         private object LogFileLock = new object();//写日志文件锁
 
         private bool IsWriteFile = false;//是否写日志文件
-        public string LogPath = LOG_PATH;
+        public string LogPath = AppDomain.CurrentDomain.BaseDirectory + LOG_PATH;
         public LogLevel LogLevel = LogLevel.All;//日志输出等级
 
         bool IsStart = false;
@@ -152,18 +155,21 @@ namespace Azylee.Core.LogUtils.SimpleLogUtils
             }
             catch { }
         }
-
+        /// <summary>
+        /// 写出到日志文件
+        /// </summary>
+        /// <param name="log"></param>
         private void WriteFile(LogModel log)
         {
             if (IsWriteFile)
             {
                 lock (LogFileLock)
                 {
-                    //设置日志目录
-                    string logPath = AppDomain.CurrentDomain.BaseDirectory + LogPath;
-                    string file = string.Format(@"{0}\{1}.txt", logPath, DateTime.Now.ToString("yyyy-MM-dd"));
+                    //设置日志目录和日志文件
+                    string filePath = GetFilePath(log.Type);
+                    string file = DirTool.Combine(filePath, DateTime.Now.ToString("yyyy-MM-dd") + ".txt");
                     //创建日志目录
-                    DirTool.Create(logPath);
+                    DirTool.Create(filePath);
                     //写出日志
                     TxtTool.Append(
                         file,
@@ -171,6 +177,7 @@ namespace Azylee.Core.LogUtils.SimpleLogUtils
                             log.CreateTime.ToString(TIME_FORMAT),
                             log.Type.ToString(),
                             StringTool.ReplaceNewLine(log.Message)));
+                    Cleaner(log.Type);
                 }
             }
         }
@@ -196,6 +203,48 @@ namespace Azylee.Core.LogUtils.SimpleLogUtils
                 }
             }
         }
+        /// <summary>
+        /// 根据分类分配目录
+        /// </summary>
+        /// <param name="type"></param>
+        /// <returns></returns>
+        private string GetFilePath(LogType type)
+        {
+            string filePath = LogPath;
+            switch (type)
+            {
+                case LogType.d: filePath = DirTool.Combine(LogPath, "debug"); break;
+                case LogType.i: filePath = DirTool.Combine(LogPath, "information"); break;
+                case LogType.e: filePath = DirTool.Combine(LogPath, "error"); break;
+                case LogType.w: filePath = DirTool.Combine(LogPath, "warning"); break;
+                case LogType.v: filePath = DirTool.Combine(LogPath, "verbose"); break;
+            }
+            return filePath;
+        }
+        /// <summary>
+        /// 清理过多的日志文件
+        /// </summary>
+        private void Cleaner(LogType type)
+        {
+            List<string> files = FileTool.GetFile(GetFilePath(type));
+            if (ListTool.HasElements(files))
+            {
+                files.ForEach(f =>
+                {
+                    try
+                    {
+                        string filename = Path.GetFileNameWithoutExtension(f);
+                        if (filename.Length == 10)
+                        {
+                            DateTime date = DateTime.Parse(filename);
+                            if (date < DateTime.Now.AddDays(-CACHE_DAYS - 1)) FileTool.Delete(f);
+                        }
+                        else { FileTool.Delete(f); }
+                    }
+                    catch { FileTool.Delete(f); }
+                });
+            }
+        }
 
         #region 分类详细输出
         /// <summary>

+ 38 - 22
Fork.Net/Azylee.Utils/Azylee.Core/LogUtils/StatusLogUtils/StatusLog.cs

@@ -43,10 +43,10 @@ namespace Azylee.Core.LogUtils.StatusLogUtils
         #endregion
 
         #region 基础属性
-        const string LOG_PATH = "StatusLog";//存储路径
+        const string LOG_PATH = "log";//存储路径
         const int CACHE_DAYS = 30;//缓存天数
 
-        public string LogPath = LOG_PATH;//存储路径
+        public string LogPath = AppDomain.CurrentDomain.BaseDirectory + LOG_PATH;//存储路径
 
         DateTime Time = DateTime.Now;//标记当前时间
         int Interval = 60 * 1000;//监测间隔时间
@@ -57,6 +57,10 @@ namespace Azylee.Core.LogUtils.StatusLogUtils
         PerformanceCounter AppProcessor = AppInfoTool.Processor();//程序CPU监控
         #endregion
 
+        public void SetLogPath(string path)
+        {
+            LogPath = path.Trim();
+        }
         public bool Start()
         {
             //如果任务停止运行,则重新创建Token,并释放上次任务
@@ -76,16 +80,13 @@ namespace Azylee.Core.LogUtils.StatusLogUtils
                 {
                     try
                     {
-                        //using (Muse db = new Muse())
-                        //{
-                        //    CollectData(db);
+                        WriteConfig();
                         while (!CancelToken.IsCancellationRequested)
                         {
                             Time = DateTime.Now;
                             Thread.Sleep(Interval);
-                            CollectData();
+                            WriteStatus();
                         }
-                        //}
                     }
                     catch { }
                 }, CancelToken.Token);
@@ -105,7 +106,24 @@ namespace Azylee.Core.LogUtils.StatusLogUtils
             }
             catch { return false; }
         }
-        private void CollectData()
+        /// <summary>
+        /// 写出资源配置信息
+        /// </summary>
+        private void WriteConfig()
+        {
+            //记录固定资源信息
+            string path = DirTool.Combine(LogPath, "resource");
+            string file = DirTool.Combine(path, "computer.ini");
+            //创建目录
+            DirTool.Create(path);
+            //写出信息
+            IniTool.WriteValue(file,"system","ram", ComputerInfoTool.TotalPhysicalMemory().ToString());
+            IniTool.WriteValue(file,"system","drive", ComputerInfoTool.GetSystemDriveTotalSize().ToString());
+        }
+        /// <summary>
+        /// 写出运行时状态信息
+        /// </summary>
+        private void WriteStatus()
         {
             try
             {
@@ -115,29 +133,27 @@ namespace Azylee.Core.LogUtils.StatusLogUtils
                     Long = Interval,
                     AFK = WindowsAPI.GetLastInputTime(),
                     CpuPer = (int)ComputerProcessor.NextValue(),
-                    RamSize = (long)ComputerInfoTool.TotalPhysicalMemory(),
                     RamFree = (long)ComputerInfoTool.AvailablePhysicalMemory(),
-                    SysDriveSize = ComputerInfoTool.GetSystemDriveTotalSize(),
                     SysDriveFree = ComputerInfoTool.GetSystemDriveAvailableSize(),
                     AppCpuPer = (int)AppProcessor.NextValue(),
                     AppRamUsed = AppInfoTool.RAM(),
                 };
 
-                WriteFile(status);
+                //设置日志目录和日志文件
+                string filePath = DirTool.Combine(LogPath, "status");
+                string file = DirTool.Combine(filePath, DateTime.Now.ToString("yyyy-MM-dd") + ".txt");
+                //创建日志目录
+                DirTool.Create(filePath);
+                //写出日志
+                TxtTool.Append(file, status.ToString());
+
                 Cleaner();
             }
-            catch { }
-        }
-        private void WriteFile(StatusLogModel status)
-        {
-            //设置日志目录
-            string logPath = AppDomain.CurrentDomain.BaseDirectory + LogPath;
-            string file = string.Format(@"{0}\{1}.txt", logPath, DateTime.Now.ToString("yyyy-MM-dd"));
-            //创建日志目录
-            DirTool.Create(logPath);
-            //写出日志
-            TxtTool.Append(file, status.ToString());
+            catch { } 
         }
+        /// <summary>
+        /// 清理过多的状态信息文件
+        /// </summary>
         private void Cleaner()
         {
             List<string> files = FileTool.GetFile(AppDomain.CurrentDomain.BaseDirectory + LogPath);

+ 1 - 12
Fork.Net/Azylee.Utils/Azylee.Core/LogUtils/StatusLogUtils/StatusLogModel.cs

@@ -29,18 +29,10 @@ namespace Azylee.Core.LogUtils.StatusLogUtils
         /// </summary>
         public int CpuPer { get; set; }
         /// <summary>
-        /// 内存容量
-        /// </summary>
-        public long RamSize { get; set; }
-        /// <summary>
         /// 可用内存
         /// </summary>
         public long RamFree { get; set; }
         /// <summary>
-        /// 系统盘容量
-        /// </summary>
-        public long SysDriveSize { get; set; }
-        /// <summary>
         /// 可用系统盘容量
         /// </summary>
         public long SysDriveFree { get; set; }
@@ -56,8 +48,7 @@ namespace Azylee.Core.LogUtils.StatusLogUtils
         public override string ToString()
         {
             string s = $"{DateTimeConvert.StandardString(Time)}|{Long}|{AFK}|{CpuPer}|" +
-                $"{RamSize}|{RamFree}|{SysDriveSize}|{SysDriveFree}|" +
-                $"{AppCpuPer}|{AppRamUsed}";
+                $"{RamFree}|{SysDriveFree}|{AppCpuPer}|{AppRamUsed}";
             return s;
         }
         public StatusLogModel FromString(string s)
@@ -70,9 +61,7 @@ namespace Azylee.Core.LogUtils.StatusLogUtils
                 try { if (elements.Length > 1) model.Long = int.Parse(elements[1]); } catch { }
                 try { if (elements.Length > 2) model.AFK = long.Parse(elements[2]); } catch { }
                 try { if (elements.Length > 3) model.CpuPer = int.Parse(elements[3]); } catch { }
-                try { if (elements.Length > 4) model.RamSize = long.Parse(elements[4]); } catch { }
                 try { if (elements.Length > 5) model.RamFree = long.Parse(elements[5]); } catch { }
-                try { if (elements.Length > 6) model.SysDriveSize = long.Parse(elements[6]); } catch { }
                 try { if (elements.Length > 7) model.SysDriveFree = long.Parse(elements[7]); } catch { }
                 try { if (elements.Length > 8) model.AppCpuPer = int.Parse(elements[8]); } catch { }
                 try { if (elements.Length > 9) model.AppRamUsed = double.Parse(elements[9]); } catch { }

+ 8 - 7
Fork.Net/Azylee.Utils/Azylee.Core/WindowsUtils/InfoUtils/ComputerInfoTool.cs

@@ -126,7 +126,7 @@ namespace Azylee.Core.WindowsUtils.InfoUtils
             return rs;
         }
         /// <summary>
-        /// 物理内存
+        /// 物理内存(单位:KB)
         /// </summary>
         /// <returns></returns>
         public static ulong TotalPhysicalMemory()
@@ -143,10 +143,11 @@ namespace Azylee.Core.WindowsUtils.InfoUtils
                 }
             }
             catch { }
+            if (size > 1024) size = size / 1024;
             return size;
         }
         /// <summary>
-        /// 可用物理内存
+        /// 可用物理内存(单位:KB)
         /// </summary>
         /// <returns></returns>
         public static ulong AvailablePhysicalMemory()
@@ -405,7 +406,7 @@ namespace Azylee.Core.WindowsUtils.InfoUtils
             return Environment.Is64BitOperatingSystem;
         }
         /// <summary>
-        /// 获取系统盘总容量
+        /// 获取系统盘总容量(单位:KB)
         /// </summary>
         /// <returns></returns>
         public static long GetSystemDriveTotalSize()
@@ -413,19 +414,19 @@ namespace Azylee.Core.WindowsUtils.InfoUtils
             try
             {
                 DriveInfo Drive = new DriveInfo("C");//系统盘驱动器
-                var osinfo = ComputerInfoTool.OsInfo();
+                var osinfo = OsInfo();
                 if (osinfo != null)
                 {
                     string drive = osinfo.Item2.Substring(0, 1);
                     Drive = new DriveInfo(drive);
                 }
-                return Drive.TotalSize;
+                return Drive.TotalSize / 1024;
             }
             catch { }
             return 0;
         }
         /// <summary>
-        /// 获取系统盘可用容量
+        /// 获取系统盘可用容量(单位:KB)
         /// </summary>
         /// <returns></returns>
         public static long GetSystemDriveAvailableSize()
@@ -438,7 +439,7 @@ namespace Azylee.Core.WindowsUtils.InfoUtils
                 {
                     string drive = osinfo.Item2.Substring(0, 1);
                     DriveInfo Drive = new DriveInfo(drive);
-                    size = Drive.TotalFreeSpace;
+                    size = Drive.TotalFreeSpace / 1024;
                 }
             }
             catch { }

+ 3 - 3
Fork.Net/Oreo.Plugins/Oreo.FilePackage/App.config

@@ -1,6 +1,6 @@
-<?xml version="1.0" encoding="utf-8" ?>
+<?xml version="1.0" encoding="utf-8"?>
 <configuration>
     <startup> 
-        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7" />
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
     </startup>
-</configuration>
+</configuration>

+ 3 - 1
Fork.Net/Oreo.Plugins/Oreo.FilePackage/Oreo.FilePackage.csproj

@@ -8,9 +8,10 @@
     <OutputType>WinExe</OutputType>
     <RootNamespace>Oreo.FilePackage</RootNamespace>
     <AssemblyName>Oreo.FilePackage</AssemblyName>
-    <TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <TargetFrameworkProfile />
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -64,6 +65,7 @@
     <Compile Include="Properties\Resources.Designer.cs">
       <AutoGen>True</AutoGen>
       <DependentUpon>Resources.resx</DependentUpon>
+      <DesignTime>True</DesignTime>
     </Compile>
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>

+ 26 - 34
Fork.Net/Oreo.Plugins/Oreo.FilePackage/Properties/Resources.Designer.cs

@@ -1,69 +1,61 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     此代码由工具生成。
-//     运行时版本: 4.0.30319.42000
+//     运行时版本:4.0.30319.42000
 //
-//     对此文件的更改可能导致不正确的行为,如果
-//     重新生成代码,则所做更改将丢失。
+//     对此文件的更改可能导致不正确的行为,并且如果
+//     重新生成代码,这些更改将会丢失。
 // </auto-generated>
 //------------------------------------------------------------------------------
 
-namespace Oreo.FilePackage.Properties
-{
-
-
+namespace Oreo.FilePackage.Properties {
+    using System;
+    
+    
     /// <summary>
-    ///   强类型资源类,用于查找本地化字符串等。
+    ///   一个强类型资源类,用于查找本地化字符串等。
     /// </summary>
     // 此类是由 StronglyTypedResourceBuilder
     // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
-    // 若要添加或除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+    // 若要添加或除成员,请编辑 .ResX 文件,然后重新运行 ResGen
     // (以 /str 作为命令选项),或重新生成 VS 项目。
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Resources
-    {
-
+    internal class Resources {
+        
         private static global::System.Resources.ResourceManager resourceMan;
-
+        
         private static global::System.Globalization.CultureInfo resourceCulture;
-
+        
         [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal Resources()
-        {
+        internal Resources() {
         }
-
+        
         /// <summary>
-        ///   返回此类使用的缓存 ResourceManager 实例。
+        ///   返回此类使用的缓存 ResourceManager 实例。
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager
-        {
-            get
-            {
-                if ((resourceMan == null))
-                {
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
                     global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Oreo.FilePackage.Properties.Resources", typeof(Resources).Assembly);
                     resourceMan = temp;
                 }
                 return resourceMan;
             }
         }
-
+        
         /// <summary>
-        ///   覆盖当前线程的 CurrentUICulture 属性
-        ///   使用此强类型的资源类的资源查找
+        ///   使用此强类型资源类,为所有资源查找
+        ///   重写当前线程的 CurrentUICulture 属性
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture
-        {
-            get
-            {
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
                 return resourceCulture;
             }
-            set
-            {
+            set {
                 resourceCulture = value;
             }
         }

+ 13 - 17
Fork.Net/Oreo.Plugins/Oreo.FilePackage/Properties/Settings.Designer.cs

@@ -1,28 +1,24 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:4.0.30319.42000
+//     此代码由工具生成。
+//     运行时版本:4.0.30319.42000
 //
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
+//     对此文件的更改可能会导致不正确的行为,并且如果
+//     重新生成代码,这些更改将会丢失。
 // </auto-generated>
 //------------------------------------------------------------------------------
 
-namespace Oreo.FilePackage.Properties
-{
-
-
+namespace Oreo.FilePackage.Properties {
+    
+    
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
-    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
-    {
-
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.6.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+        
         private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
-        public static Settings Default
-        {
-            get
-            {
+        
+        public static Settings Default {
+            get {
                 return defaultInstance;
             }
         }

+ 16 - 0
Fork.Net/Test/Test.BlackBox/Form1.Designer.cs

@@ -28,9 +28,12 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             this.BTStartBB = new System.Windows.Forms.Button();
             this.textBox1 = new System.Windows.Forms.TextBox();
             this.BTStopBB = new System.Windows.Forms.Button();
+            this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
+            this.BTWriteLog = new System.Windows.Forms.Button();
             this.SuspendLayout();
             // 
             // BTStartBB
@@ -61,11 +64,22 @@
             this.BTStopBB.UseVisualStyleBackColor = true;
             this.BTStopBB.Click += new System.EventHandler(this.BTStopBB_Click);
             // 
+            // BTWriteLog
+            // 
+            this.BTWriteLog.Location = new System.Drawing.Point(363, 126);
+            this.BTWriteLog.Name = "BTWriteLog";
+            this.BTWriteLog.Size = new System.Drawing.Size(75, 23);
+            this.BTWriteLog.TabIndex = 3;
+            this.BTWriteLog.Text = "写日志";
+            this.BTWriteLog.UseVisualStyleBackColor = true;
+            this.BTWriteLog.Click += new System.EventHandler(this.BTWriteLog_Click);
+            // 
             // Form1
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(553, 365);
+            this.Controls.Add(this.BTWriteLog);
             this.Controls.Add(this.BTStopBB);
             this.Controls.Add(this.textBox1);
             this.Controls.Add(this.BTStartBB);
@@ -82,6 +96,8 @@
         private System.Windows.Forms.Button BTStartBB;
         private System.Windows.Forms.TextBox textBox1;
         private System.Windows.Forms.Button BTStopBB;
+        private System.Windows.Forms.ToolTip toolTip1;
+        private System.Windows.Forms.Button BTWriteLog;
     }
 }
 

+ 12 - 1
Fork.Net/Test/Test.BlackBox/Form1.cs

@@ -1,4 +1,5 @@
-using Azylee.Core.LogUtils.StatusLogUtils;
+using Azylee.Core.LogUtils.SimpleLogUtils;
+using Azylee.Core.LogUtils.StatusLogUtils;
 using System;
 using System.Windows.Forms;
 
@@ -6,6 +7,7 @@ namespace Test.BlackBox
 {
     public partial class Form1 : Form
     {
+        Log Log = new Log(true);
         public Form1()
         {
             InitializeComponent();
@@ -24,5 +26,14 @@ namespace Test.BlackBox
             bool flag = StatusLog.Instance.Stop();
             textBox1.AppendText(Environment.NewLine + (flag ? "停止成功" : "停止失败"));
         }
+
+        private void BTWriteLog_Click(object sender, EventArgs e)
+        {
+            Log.e("yoyoyoyoyo");
+            Log.w("yoyoyoyoyo");
+            Log.d("yoyoyoyoyo");
+            Log.i("yoyoyoyoyo");
+            Log.v("yoyoyoyoyo");
+        }
     }
 }

+ 3 - 0
Fork.Net/Test/Test.BlackBox/Form1.resx

@@ -117,4 +117,7 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
 </root>