Add error log when using --rm-all-app-profile option (#493)
[platform/core/dotnet/launcher.git] / NativeLauncher / tool / tpatool.cc
index ef00bf5..8256890 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "utils.h"
 #include "path_manager.h"
+#include "log.h"
 
 int main(int argc, char* argv[])
 {
@@ -27,19 +28,19 @@ int main(int argc, char* argv[])
        try {
                __pm = new PathManager();
        }  catch (const std::exception& e) {
-               fprintf(stderr, "Failed to create PathManager");
+               _SERR("Failed to create PathManager");
                return -1;
        }
 
        std::string tpaList;
        addAssembliesFromDirectories(__pm->getPlatformAssembliesPaths(), tpaList);
 
-       if (!bf::is_symlink(PLATFORM_TPA_CACHE)) {
+       if (!isSymlinkFile(PLATFORM_TPA_CACHE)) {
                std::ofstream out(PLATFORM_TPA_CACHE);
                out << tpaList;
                out.close();
        } else {
-               fprintf(stderr, "Failed to create platform_tpa_cache. Symbolic link is detected\n");
+               _SERR("Failed to create platform_tpa_cache. Symbolic link is detected");
                return -1;
        }