2021
04-27
04-27
如何保存Unity中的Log日志
代码中的debug日志保存本地usingSystem.Collections;usingUnityEngine;usingSystem.IO;publicclassSaveLog:MonoBehaviour{privatefloatlength;Queuequeue;privatevoidAwake(){DontDestroyOnLoad(this);LogToFile("Versionoftheruntime:"+Application.unityVersion,true,false);Application.logMessageReceivedThreaded+=OnReceiveLogMsg;queue=newQue...
继续阅读 >
一,Maven依赖pom.xml配置1,去掉默认日志,以便切换到log4j2的日志依赖2,然后添加如下两个日志依赖二,在工程根目录下添加lo4g2.yml配置文件2,配置文件内容<!--配置log4j2--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-log4j2</artifactId></dependency><!--加上这个才能辨认到log4j2.yml文件--><dependency><groupId>com.fasterxml.jackson.dat...