Java tinylog正在格式化普通数字,比如货币
我在glassfish中使用tinylog记录我的web服务请求。以下是日志语句:Java tinylog正在格式化普通数字,比如货币,java,logging,tinylog,Java,Logging,Tinylog,我在glassfish中使用tinylog记录我的web服务请求。以下是日志语句: Logger.info("record received from user: {0}, stationAxisId: {1}. inserted with recordId: {2}. server timestamp: {3}", username, stationAxisId, res.recordId, res.timeStamp); 问题是stationAxisId,它是整数。但我在日志文件中看到的是
Logger.info("record received from user: {0}, stationAxisId: {1}. inserted with recordId: {2}. server timestamp: {3}", username, stationAxisId, res.recordId, res.timeStamp);
问题是stationAxisId
,它是整数。但我在日志文件中看到的是:
addNewRecord-INFO-record received from user: kia, stationAxisId: 10,543,201. inserted with recordId: 56. server timestamp: 1391/07/04 13:55:35.348
它像钱一样格式化
stationaxis
。如何修复它?tinylog在内部使用MessageFormat,请参见第二个答案: