From afa0de1ce3f5de4ad732c3ed98eb4ff8dcf9ac92 Mon Sep 17 00:00:00 2001 From: Sven Weidauer Date: Sat, 23 Dec 2017 12:28:17 +0100 Subject: Change LOG calls to NSLOG --- frontends/cocoa/DownloadWindowController.m | 2 +- frontends/cocoa/NetsurfApp.m | 2 +- frontends/cocoa/desktop-tree.m | 2 +- frontends/cocoa/fetch.m | 10 +++++----- frontends/cocoa/plotter.m | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'frontends/cocoa') diff --git a/frontends/cocoa/DownloadWindowController.m b/frontends/cocoa/DownloadWindowController.m index 41373710c..8850327b9 100644 --- a/frontends/cocoa/DownloadWindowController.m +++ b/frontends/cocoa/DownloadWindowController.m @@ -106,7 +106,7 @@ static void cocoa_register_download(DownloadWindowController *download); (NSString *)kLSQuarantineTypeWebDownload, (NSString *)kLSQuarantineTypeKey, nil]; LSSetItemAttribute(&ref, kLSRolesAll, kLSItemQuarantineProperties, (__bridge CFDictionaryRef)attributes); - LOG("Set quarantine attributes on file %s", [path UTF8String]); + NSLOG(netsurf, INFO, "Set quarantine attributes on file %s", [path UTF8String]); } [self setOutputFile:[NSFileHandle fileHandleForWritingAtPath:path]]; diff --git a/frontends/cocoa/NetsurfApp.m b/frontends/cocoa/NetsurfApp.m index 4c5442a2d..fabf8a795 100644 --- a/frontends/cocoa/NetsurfApp.m +++ b/frontends/cocoa/NetsurfApp.m @@ -86,7 +86,7 @@ static void die(const char *const error) urldb_load_cookies(nsoption_charp(cookie_file)); cocoa_update_scale_factor(); - LOG("done setup"); + NSLOG(netsurf, INFO, "done setup"); } - (void)saveOptions diff --git a/frontends/cocoa/desktop-tree.m b/frontends/cocoa/desktop-tree.m index 1015f9358..0874eeef7 100644 --- a/frontends/cocoa/desktop-tree.m +++ b/frontends/cocoa/desktop-tree.m @@ -278,7 +278,7 @@ struct tree *tree_create(unsigned int flags, tree = calloc(sizeof(struct tree), 1); if (tree == NULL) { - LOG("calloc failed"); + NSLOG(netsurf, INFO, "calloc failed"); guit->misc->warning(messages_get_errorcode(NSERROR_NOMEM), 0); return NULL; } diff --git a/frontends/cocoa/fetch.m b/frontends/cocoa/fetch.m index 74ba9afa3..1e3e5af13 100644 --- a/frontends/cocoa/fetch.m +++ b/frontends/cocoa/fetch.m @@ -50,13 +50,13 @@ static const char *fetch_filetype(const char *unix_path) uti = [[NSWorkspace sharedWorkspace] typeOfFile:[NSString stringWithUTF8String:unix_path] error:&utiError]; if (nil != uti) { - LOG("Looking for mimetype from uti \"%s\"", [uti UTF8String]); + NSLOG(netsurf, INFO, "Looking for mimetype from uti \"%s\"", [uti UTF8String]); mimeType = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)uti, kUTTagClassMIMEType); } else { NSAlert *utiAlert = [NSAlert alertWithError:utiError]; [utiAlert runModal]; // Ignore return value. - LOG("uti call failed"); + NSLOG(netsurf, INFO, "uti call failed"); strncpy(cocoafiletype, "text/html", sizeof(cocoafiletype)); return cocoafiletype; @@ -67,13 +67,13 @@ static const char *fetch_filetype(const char *unix_path) } else { const char *extension; - LOG("mimetype from uti failed"); + NSLOG(netsurf, INFO, "mimetype from uti failed"); extension = [(__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)uti, kUTTagClassFilenameExtension) UTF8String]; if (extension == NULL) { /* give up and go with default */ - LOG("No extension going with default type"); + NSLOG(netsurf, INFO, "No extension going with default type"); strncpy(cocoafiletype, "text/html", sizeof(cocoafiletype)); } else { int eidx = 0; /* index of extension entry */ @@ -88,7 +88,7 @@ static const char *fetch_filetype(const char *unix_path) } } - LOG("\tMIME type for '%s' is '%s'", unix_path, cocoafiletype); + NSLOG(netsurf, INFO, "\tMIME type for '%s' is '%s'", unix_path, cocoafiletype); return cocoafiletype; } diff --git a/frontends/cocoa/plotter.m b/frontends/cocoa/plotter.m index f91167701..a6afbb93a 100644 --- a/frontends/cocoa/plotter.m +++ b/frontends/cocoa/plotter.m @@ -203,7 +203,7 @@ static nserror plot_path(const struct redraw_context *ctx, const plot_style_t *p return NSERROR_OK; if (*p != PLOTTER_PATH_MOVE) { - LOG("Path does not start with move"); + NSLOG(netsurf, INFO, "Path does not start with move"); return NSERROR_INVALID; } @@ -238,7 +238,7 @@ static nserror plot_path(const struct redraw_context *ctx, const plot_style_t *p break; default: - LOG("Invalid path"); + NSLOG(netsurf, INFO, "Invalid path"); return NSERROR_INVALID; } } -- cgit v1.2.3