84669 Lernen von Personen
152542 Lernen von Personen
20005 Lernen von Personen
5487 Lernen von Personen
7821 Lernen von Personen
359900 Lernen von Personen
3350 Lernen von Personen
180660 Lernen von Personen
48569 Lernen von Personen
18603 Lernen von Personen
40936 Lernen von Personen
1549 Lernen von Personen
1183 Lernen von Personen
32909 Lernen von Personen
如图是之前在windows系统下使用的,把log4js的路径写成绝对路径;现在在mac系统下,从新改了路径,可是还是报错,不知道是怎么回事。这个不能写成绝对路径吗?
这是最初写的文件路径, 我以为是运行noded的问题,看了看应该是这个路径的问题,没有D盘
后来改成了mac下的绝对路径
但是还是出现了这样的报错
是我路径写的不对吗?可是文件生成了呀?
认证高级PHP讲师
应该不是log4js配置的问题,我试了下,按照你上面的配置能正常的建立目录,输出日志信息。下面是我的配置:
{ "appenders": [ { "type":"console", "category":"logInfo" }, { "type": "dateFile", "filename": "/Users/ycgAccount/Desktop/tmp/test", "pattern": "debug/-yyyy-MM-dd-hh.log", "absolute":true, "alwaysIncludePattern": true, "category":"logInfo" } ], "replaceConsole": false, "levels": { "log_file":"ALL", "console":"ALL", "logInfo":"ALL" } }
应该不是log4js配置的问题,我试了下,按照你上面的配置能正常的建立目录,输出日志信息。
下面是我的配置: