45 |
45 |
46 CTefConsole::CTefConsole() |
46 CTefConsole::CTefConsole() |
47 { |
47 { |
48 } |
48 } |
49 |
49 |
|
50 _LIT(KDefaultLog, "c:\\logs\\testexecute\\fshell.htm"); |
|
51 |
50 TInt CTefConsole::Create(const TDesC& aTitle, TSize /*aSize*/) |
52 TInt CTefConsole::Create(const TDesC& aTitle, TSize /*aSize*/) |
51 { |
53 { |
52 iLogger = new CTestExecuteLogger(); |
54 iLogger = new CTestExecuteLogger(); |
53 if (!iLogger) return KErrNoMemory; |
55 if (!iLogger) return KErrNoMemory; |
54 TInt logMode = TLoggerOptions(ELogHTMLOnly); |
56 TInt logMode = TLoggerOptions(ELogHTMLOnly); |
55 TInt logLevel = RFileFlogger::TLogSeverity(ESevrAll); |
57 TInt logLevel = RFileFlogger::TLogSeverity(ESevrAll); |
56 iLogger->SetLoggerOptions(logMode); |
58 iLogger->SetLoggerOptions(logMode); |
57 TInt err = iLogger->Connect(); |
59 TInt err = iLogger->Connect(); |
58 if (err) return err; |
60 if (err) return err; |
59 const TDesC& logFilePath(aTitle); |
61 TPtrC logFilePath(KDefaultLog); |
|
62 if (aTitle.Left(5) == _L("name=")) |
|
63 { |
|
64 logFilePath.Set(aTitle.Mid(5)); |
|
65 } |
60 err = iLogger->HtmlLogger().CreateLog(logFilePath, RTestExecuteLogServ::ELogModeAppend); |
66 err = iLogger->HtmlLogger().CreateLog(logFilePath, RTestExecuteLogServ::ELogModeAppend); |
61 if (err) return err; |
67 if (err) return err; |
62 iLogger->HtmlLogger().SetLogLevel(TLogSeverity(logLevel)); |
68 iLogger->HtmlLogger().SetLogLevel(TLogSeverity(logLevel)); |
63 |
69 |
64 iLogger->HtmlLogger().Write(_L("<pre>\r\n")); // horrible horrible tef logging - the client is responsible for writing markup! |
70 iLogger->HtmlLogger().Write(_L("<pre>\r\n")); // horrible horrible tef logging - the client is responsible for writing markup! |