Exemplo n.º 1
0
        public static void init()
        {
            path = Application.persistentDataPath + "/Storage/logs/logs-" + System.DateTime.Now.ToString("yyyyMMdd-HHmmss") + ".log";
            var dir = Path.GetDirectoryName(path);

            if (!Directory.Exists(dir))
            {
                DirectoryInfo di = Directory.CreateDirectory(dir);
                if (!di.Exists)
                {
                    return;
                }
            }

            //Debug.Log("Logger path: " + path);
            logger = Loggers.NewFileLogger("tag", path, TimeSpan.FromSeconds(30));
            write("sgffu.Log.Service::init()");
        }