需要使用的插件库说明:
Loxodon Framework Log4Net
Version: 1.0.0
© 2016, Clark Yang
=======================================
Thank you for purchasing the plugin!
I hope you enjoy using the product and that it makes your game development faster and easier.
If you have a moment,please leave me a review on the Asset Store.
The version is compatible with MacOSX,Windows,Linux iOS and Android etc.
Requires Loxodon Framework.
https://www.assetstore.unity3d.com/#!/content/77446
Please email yangpc.china@gmail.com for any help or issues.
UPDATE NOTES
----------------------------------------
参考Log4NetExample扩展自己的Loger:
1 using System.IO; 2 using Loxodon.Log; 3 using UnityEngine; 4 5 public sealed class ZSLoger 6 { 7 static private ZSLoger _instance; 8 static public ZSLoger Instance 9 { 10 get 11 { 12 if (_instance == null) 13 { 14 _instance = new ZSLoger(); 15 } 16 return _instance; 17 } 18 } 19 20 private ZSLoger() 21 { 22 InitializeLog(); 23 } 24 25 private void InitializeLog() 26 { 27 /* Initialize the log4net */ 28 TextAsset configText = Resources.Load<TextAsset>("Log4NetConfig"); 29 if (configText != null) 30 { 31 using (MemoryStream memStream = new MemoryStream(configText.bytes)) 32 { 33 log4net.Config.XmlConfigurator.Configure(memStream); 34 } 35 } 36 37 /* Initialize the Loxodon.Log.LogManager */ 38 LogManager.Registry(new Log4NetFactory()); 39 } 40 41 public ILog Loger 42 { 43 get 44 { 45 return LogManager.GetLogger(typeof(ZSLoger)); 46 } 47 } 48 }