Skip to content

Commit

Permalink
less logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kjk committed Sep 10, 2024
1 parent cad932c commit e6686bd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/CrashHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ static void BuildSymbolPath(const char* symDir) {

char* p = path.CStr();
str::ReplaceWithCopy(&gSymbolPath, p);
logf("BuildSymbolPath: gSymbolPath '%s', symDir '%s'\n", gSymbolPath, symDir);
logf("gSymbolPath: '%s'\n", gSymbolPath);
}

bool SetSymbolsDir(const char* symDir) {
Expand Down Expand Up @@ -765,8 +765,8 @@ void InstallCrashHandler(const char* crashDumpPath, const char* crashFilePath, c
return;
}

logf("InstallCrashHandler crashDumpPath: '%s'\ncrashFilePath: '%s'\nsymDir: '%s'\n", crashDumpPath, crashFilePath,
symDir);
logf("InstallCrashHandler:\n crashDumpPath: '%s'\n crashFilePath: '%s'\n symDir: '%s'\n", crashDumpPath,
crashFilePath, symDir);

gCrashDumpPath = str::Dup(crashDumpPath);
gCrashFilePath = str::Dup(crashFilePath);
Expand Down
2 changes: 1 addition & 1 deletion src/Flags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ FileArgs* ParseFileArgs(const char* path) {

/* parse argument list. we assume that all unrecognized arguments are file names. */
void ParseFlags(const WCHAR* cmdLine, Flags& i) {
logf("ParseFlags: cmdLine: '%s'\n", ToUtf8Temp(cmdLine));
// logf("ParseFlags: cmdLine: '%s'\n", ToUtf8Temp(cmdLine));
CmdLineArgsIter args(cmdLine);

const char* param = nullptr;
Expand Down
17 changes: 7 additions & 10 deletions src/SumatraStartup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,11 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int) {

CheckIsStoreBuild();

// do this before running installer etc. so that we have disk / net permissions
// (default policy is to disallow everything)
InitializePolicies(flags.restrictedUse);

#if defined(DEBUG)
if (false) {
const char* dir = "C:\\Users\\kjk\\Downloads";
auto di = DirIter{dir};
Expand All @@ -989,12 +994,6 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int) {
logf("d->filePath: '%s'\n", d->filePath);
}
}

// do this before running installer etc. so that we have disk / net permissions
// (default policy is to disallow everything)
InitializePolicies(flags.restrictedUse);

#if defined(DEBUG)
if (false) {
TempStr exePath = GetSelfExePathTemp();
RunNonElevated(exePath);
Expand All @@ -1015,8 +1014,8 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int) {

{
char* s = ToUtf8Temp(GetCommandLineW());
logf("Starting SumatraPDF %s, GetCommandLineW(): '%s', flags.install: %d, flags.uninstall: %d\n",
UPDATE_CHECK_VERA, s, (int)flags.install, (int)flags.uninstall);
logf("Starting: '%s'\n ver %s, flags.install: %d, flags.uninstall: %d\n", s, UPDATE_CHECK_VERA,
(int)flags.install, (int)flags.uninstall);
}
#if defined(DEBUG)
if (gIsDebugBuild || gIsPreReleaseBuild) {
Expand Down Expand Up @@ -1054,7 +1053,6 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int) {
return exitCode;
}

logf(" isInstaller: %d\n", (int)isInstaller);
if (isInstaller) {
if (!ExeHasInstallerResources()) {
ShowNotValidInstallerError();
Expand All @@ -1066,7 +1064,6 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int) {
::ExitProcess(exitCode);
}

logf(" isUninstaller: %d, flags.uninstaller: %d\n", (int)isUninstaller, (int)flags.uninstall);
if (isUninstaller) {
exitCode = RunUninstaller();
::ExitProcess(exitCode);
Expand Down

0 comments on commit e6686bd

Please sign in to comment.