QDebug DailyRollingFileAppender::debug(QDebug &rDebug) const { QString layout_name; if (layout()) layout_name = layout()->name(); QString codec_name; if (encoding()) codec_name = QLatin1String(encoding()->name()); rDebug.nospace() << "DailyRollingFileAppender(" << "name:" << name() << " " << "activedatepattern:" << mActiveDatePattern << " " << "appendfile:" << appendFile() << " " << "bufferedio:" << bufferedIo() << " " << "datepattern:" << datePattern() << " " << "encoding:" << codec_name << " " << "frequency:" << frequencyToString() << " " << "file:" << fileName() << " " << "filepath:" << filePath() << " " << "suffix:" << suffix() << " " << "fullFileName:" << fullFileName() << " " << "filter:" << firstFilter() << " " << "immediateflush:" << immediateFlush() << " " << "isactive:" << isActive() << " " << "isclosed:" << isClosed() << " " << "layout:" << layout_name << " " << "referencecount:" << referenceCount() << " " << "rollovertime:" << mRollOverTime << "threshold:" << threshold().toString() << "writer:" << writer() << ")"; return rDebug.space(); }
VString XLinuxIntlMgr::GetDateSeparator() const { VString dateSeparator; icu::DateFormat* dateFmt=icu::DateFormat::createDateInstance(icu::DateFormat::SHORT, fLocale); xbox_assert(dateFmt!=NULL); icu::SimpleDateFormat* simpleDateFmt=reinterpret_cast<icu::SimpleDateFormat*>(dateFmt); xbox_assert(simpleDateFmt!=NULL); if(simpleDateFmt!=NULL) { UErrorCode err=U_ZERO_ERROR; UnicodeString tmpPattern; simpleDateFmt->toLocalizedPattern(tmpPattern, err); xbox_assert(err==U_ZERO_ERROR); VString datePattern(tmpPattern.getTerminatedBuffer()); bool isQuoted=false; for(int i=0 ; i<datePattern.GetLength() ; i++) { UniChar c=datePattern[i]; if(c=='\'') isQuoted=!isQuoted; if(isQuoted) continue; //ICU works with patterns ("M/d/yy" for ex.) and doesn't have a notion of date separator. //As a work around, we try to get a localized date pattern and pick the first char that looks like a separator. if(!(c>='A' && c<='Z') && !(c>='a' && c<='z')) { dateSeparator.AppendUniChar(c); break; } } } if(dateFmt!=NULL) delete dateFmt; xbox_assert(!dateSeparator.IsEmpty()); if(dateSeparator.IsEmpty()) return VString("/"); return dateSeparator; }