diff options
Diffstat (limited to 'src/Util')
-rwxr-xr-x | src/Util/InstallerUtil.cpp | 23 | ||||
-rwxr-xr-x | src/Util/InstallerUtil.h | 2 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/Util/InstallerUtil.cpp b/src/Util/InstallerUtil.cpp index afdea15..b6f4ed7 100755 --- a/src/Util/InstallerUtil.cpp +++ b/src/Util/InstallerUtil.cpp @@ -411,3 +411,26 @@ InstallerUtil::CreateSymlinkForAppDirectory(const String& inPath, String& outPat return true; } +bool +InstallerUtil::DumpLog(const char* pBuf) +{ + char temp[4096] = {0}; + TryReturn(pBuf, false, "[osp-installer] pBuf is null"); + + int bufLen = strlen(pBuf); + strncpy(temp, pBuf, sizeof(temp)); + + char *pStart = &temp[0]; + + for (int i = 0; i < bufLen; i++) + { + if (temp[i] == '\n') + { + temp[i] = 0; + AppLogTag(OSP_INSTALLER, "%s", pStart); + pStart = temp + i + 1; + } + } + + return true; +} diff --git a/src/Util/InstallerUtil.h b/src/Util/InstallerUtil.h index fa91af7..a83a7b8 100755 --- a/src/Util/InstallerUtil.h +++ b/src/Util/InstallerUtil.h @@ -61,6 +61,8 @@ public: static bool CreateSymlinkForAppDirectory(const Osp::Base::String& inPath, Osp::Base::String& outPath); + static bool DumpLog(const char* pBuf); + private: InstallerUtil(const InstallerUtil& value); InstallerUtil& operator =(const InstallerUtil& source); |