#1 2014-10-15 07:38:00

win2014
Member
Registered: 2014-06-10
Posts: 31

Is file name of TSynLog in english only?

When my app file use chinese, the log file name to be messing(incorrect code page?)
e.g.   ä¸­æ–‡é—®é¢˜ 20141015 152947.log

Offline

#2 2014-10-21 01:30:28

win2014
Member
Registered: 2014-06-10
Posts: 31

Re: Is file name of TSynLog in english only?

@ab, give me some hints?

Offline

#3 2014-10-21 02:08:27

ChinaPeng
Member
Registered: 2014-10-02
Posts: 15

Re: Is file name of TSynLog in english only?

mORMot 只UTF8编码 你的文件名称没有转码  编码问题

Offline

#4 2014-10-21 05:29:08

win2014
Member
Registered: 2014-06-10
Posts: 31

Re: Is file name of TSynLog in english only?

ChinaPeng wrote:

mORMot 只UTF8编码 你的文件名称没有转码  编码问题

我直接使用的TSynLog.Family配置log,是不得创建TSynLog实例,然后使用它的FileName属性特意指定文件名?

Offline

#5 2014-10-21 06:13:10

ChinaPeng
Member
Registered: 2014-10-02
Posts: 15

Re: Is file name of TSynLog in english only?

mORMot程序名 需要英文,如果程序名称是中文,自己需要修改下

 
procedure TSynLog.ComputeFileName;
var timeNow,hourRotate,timeBeforeRotate: TDateTime;
    {$ifndef MSWINDOWS}
    i: integer;
    {$endif}
begin
  {$ifdef MSWINDOWS}
  ExeVersionRetrieve;
   fFileName := Ansi7ToString(ExeVersion.ProgramName);

   

这里使用的是Ansi7ToString

Offline

#6 2014-10-21 08:13:20

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: Is file name of TSynLog in english only?

Indeed...

Should be fixed by http://synopse.info/fossil/info/71eff18666

Thanks for the feedback!

Offline

Board footer

Powered by FluxBB