{"id":3057,"date":"2023-06-06T21:21:38","date_gmt":"2023-06-07T01:21:38","guid":{"rendered":"https:\/\/michaelrowe01.com\/?p=3057"},"modified":"2023-06-06T21:21:41","modified_gmt":"2023-06-07T01:21:41","slug":"debug-with-structured-logging","status":"publish","type":"post","link":"https:\/\/michaelrowe01.com\/index.php\/blog\/debug-with-structured-logging\/","title":{"rendered":"Debug with Structured Logging"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"blob:https:\/\/michaelrowe01.com\/35d952aa-c4c3-4367-9a34-c1509b0c44fa\" alt=\"Screenshot 2023-06-06 at 20.52.59 (2).png\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">New debug console&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Message is the focus not all the prefixes.. so you can add them back in based on metadata options flag.&nbsp; This now shows up below the message<\/li>\n\n\n\n<li>Yellow or Red background is an error and fault<\/li>\n\n\n\n<li>Can also press space on a single log entry.<\/li>\n\n\n\n<li>You can also use filtering so only show what you care about, you will get auto complete view too. You can also right click on a log entry and use it to show similar or hide similar etc.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Live debugging<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Demo&nbsp;<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">LLDB Improvements&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use p instead of po so you can get the details of an object<\/li>\n\n\n\n<li>Hard to remember all the new commands.. try dwim-print (or do what I mean print), you can just use \u201cp\u201d instead<\/li>\n\n\n\n<li>Po will now do what I want plus customer object descriptions<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Tips for logging<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>OSLog is for debugging, print is only for stdio<\/li>\n\n\n\n<li>You should log any tasks being done, along with the results(&nbsp;<\/li>\n\n\n\n<li>You get all the meta data is you use OSLog &#8211; import OSLog in to the project.&nbsp; Define your Logger with a subsystem (your app) and category (your function)<\/li>\n\n\n\n<li>Consider\n<ul class=\"wp-block-list\">\n<li>create multiple log handles for different components&nbsp;<\/li>\n\n\n\n<li>Use OSLogStore for collection in the field<\/li>\n\n\n\n<li>OSLog is a tracing facility &#8211; it can do performance too<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>New debug console&nbsp; Live debugging LLDB Improvements&nbsp; Tips for logging<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_wp_convertkit_post_meta":{"form":"-1","landing_page":"0","tag":"0","restrict_content":"0"},"hide_page_title":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[2,3],"tags":[107,111,699,680],"class_list":["post-3057","post","type-post","status-publish","format-standard","hentry","category-blog","category-personal-softwareandit","tag-day-2","tag-debugging","tag-oslog","tag-wwdc23"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Michael Rowe\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/michaelrowe01.com\/index.php\/blog\/debug-with-structured-logging\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Random Thoughts | A blog about things that interest me.\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Debug with Structured Logging | Random Thoughts\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/michaelrowe01.com\/index.php\/blog\/debug-with-structured-logging\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/michaelrowe01.com\/wp-content\/uploads\/2019\/04\/img_0391.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/michaelrowe01.com\/wp-content\/uploads\/2019\/04\/img_0391.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"3088\" \/>\n\t\t<meta property=\"og:image:height\" content=\"2316\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2023-06-07T01:21:38+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2023-06-07T01:21:41+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Debug with Structured Logging | Random Thoughts\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/michaelrowe01.com\/wp-content\/uploads\/2019\/04\/img_0391.jpg\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/blog\\\/debug-with-structured-logging\\\/#article\",\"name\":\"Debug with Structured Logging | Random Thoughts\",\"headline\":\"Debug with Structured Logging\",\"author\":{\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/author\\\/michaelrowe\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"blob:https:\\\/\\\/michaelrowe01.com\\\/35d952aa-c4c3-4367-9a34-c1509b0c44fa\",\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/blog\\\/debug-with-structured-logging\\\/#articleImage\"},\"datePublished\":\"2023-06-06T21:21:38-04:00\",\"dateModified\":\"2023-06-06T21:21:41-04:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/blog\\\/debug-with-structured-logging\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/blog\\\/debug-with-structured-logging\\\/#webpage\"},\"articleSection\":\"blog, Personal - Software and IT, day 2, debugging, oslog, wwdc23\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/blog\\\/debug-with-structured-logging\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/michaelrowe01.com#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/michaelrowe01.com\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/category\\\/blog\\\/#listItem\",\"name\":\"blog\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/category\\\/blog\\\/#listItem\",\"position\":2,\"name\":\"blog\",\"item\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/category\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/blog\\\/debug-with-structured-logging\\\/#listItem\",\"name\":\"Debug with Structured Logging\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/michaelrowe01.com#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/blog\\\/debug-with-structured-logging\\\/#listItem\",\"position\":3,\"name\":\"Debug with Structured Logging\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/category\\\/blog\\\/#listItem\",\"name\":\"blog\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/#organization\",\"name\":\"Michael Rowe\",\"description\":\"A blog about things that interest me.\",\"url\":\"https:\\\/\\\/michaelrowe01.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/michaelrowe01.com\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/IMG_0120.jpeg?fit=1024%2C1024&ssl=1\",\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/blog\\\/debug-with-structured-logging\\\/#organizationLogo\",\"width\":1024,\"height\":1024},\"image\":{\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/blog\\\/debug-with-structured-logging\\\/#organizationLogo\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/author\\\/michaelrowe\\\/#author\",\"url\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/author\\\/michaelrowe\\\/\",\"name\":\"Michael Rowe\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/blog\\\/debug-with-structured-logging\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/23f6c08c7576fa07e47f582da2eb7619aeb556ceddf53a274fdb9069926e5bc1?s=96&r=g\",\"width\":96,\"height\":96,\"caption\":\"Michael Rowe\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/blog\\\/debug-with-structured-logging\\\/#webpage\",\"url\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/blog\\\/debug-with-structured-logging\\\/\",\"name\":\"Debug with Structured Logging | Random Thoughts\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/blog\\\/debug-with-structured-logging\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/author\\\/michaelrowe\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/index.php\\\/author\\\/michaelrowe\\\/#author\"},\"datePublished\":\"2023-06-06T21:21:38-04:00\",\"dateModified\":\"2023-06-06T21:21:41-04:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/#website\",\"url\":\"https:\\\/\\\/michaelrowe01.com\\\/\",\"name\":\"Random Thoughts\",\"description\":\"A blog about things that interest me.\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/michaelrowe01.com\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Debug with Structured Logging | Random Thoughts","description":"","canonical_url":"https:\/\/michaelrowe01.com\/index.php\/blog\/debug-with-structured-logging\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/michaelrowe01.com\/index.php\/blog\/debug-with-structured-logging\/#article","name":"Debug with Structured Logging | Random Thoughts","headline":"Debug with Structured Logging","author":{"@id":"https:\/\/michaelrowe01.com\/index.php\/author\/michaelrowe\/#author"},"publisher":{"@id":"https:\/\/michaelrowe01.com\/#organization"},"image":{"@type":"ImageObject","url":"blob:https:\/\/michaelrowe01.com\/35d952aa-c4c3-4367-9a34-c1509b0c44fa","@id":"https:\/\/michaelrowe01.com\/index.php\/blog\/debug-with-structured-logging\/#articleImage"},"datePublished":"2023-06-06T21:21:38-04:00","dateModified":"2023-06-06T21:21:41-04:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/michaelrowe01.com\/index.php\/blog\/debug-with-structured-logging\/#webpage"},"isPartOf":{"@id":"https:\/\/michaelrowe01.com\/index.php\/blog\/debug-with-structured-logging\/#webpage"},"articleSection":"blog, Personal - Software and IT, day 2, debugging, oslog, wwdc23"},{"@type":"BreadcrumbList","@id":"https:\/\/michaelrowe01.com\/index.php\/blog\/debug-with-structured-logging\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/michaelrowe01.com#listItem","position":1,"name":"Home","item":"https:\/\/michaelrowe01.com","nextItem":{"@type":"ListItem","@id":"https:\/\/michaelrowe01.com\/index.php\/category\/blog\/#listItem","name":"blog"}},{"@type":"ListItem","@id":"https:\/\/michaelrowe01.com\/index.php\/category\/blog\/#listItem","position":2,"name":"blog","item":"https:\/\/michaelrowe01.com\/index.php\/category\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/michaelrowe01.com\/index.php\/blog\/debug-with-structured-logging\/#listItem","name":"Debug with Structured Logging"},"previousItem":{"@type":"ListItem","@id":"https:\/\/michaelrowe01.com#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/michaelrowe01.com\/index.php\/blog\/debug-with-structured-logging\/#listItem","position":3,"name":"Debug with Structured Logging","previousItem":{"@type":"ListItem","@id":"https:\/\/michaelrowe01.com\/index.php\/category\/blog\/#listItem","name":"blog"}}]},{"@type":"Organization","@id":"https:\/\/michaelrowe01.com\/#organization","name":"Michael Rowe","description":"A blog about things that interest me.","url":"https:\/\/michaelrowe01.com\/","logo":{"@type":"ImageObject","url":"https:\/\/i0.wp.com\/michaelrowe01.com\/wp-content\/uploads\/2024\/11\/IMG_0120.jpeg?fit=1024%2C1024&ssl=1","@id":"https:\/\/michaelrowe01.com\/index.php\/blog\/debug-with-structured-logging\/#organizationLogo","width":1024,"height":1024},"image":{"@id":"https:\/\/michaelrowe01.com\/index.php\/blog\/debug-with-structured-logging\/#organizationLogo"}},{"@type":"Person","@id":"https:\/\/michaelrowe01.com\/index.php\/author\/michaelrowe\/#author","url":"https:\/\/michaelrowe01.com\/index.php\/author\/michaelrowe\/","name":"Michael Rowe","image":{"@type":"ImageObject","@id":"https:\/\/michaelrowe01.com\/index.php\/blog\/debug-with-structured-logging\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/23f6c08c7576fa07e47f582da2eb7619aeb556ceddf53a274fdb9069926e5bc1?s=96&r=g","width":96,"height":96,"caption":"Michael Rowe"}},{"@type":"WebPage","@id":"https:\/\/michaelrowe01.com\/index.php\/blog\/debug-with-structured-logging\/#webpage","url":"https:\/\/michaelrowe01.com\/index.php\/blog\/debug-with-structured-logging\/","name":"Debug with Structured Logging | Random Thoughts","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/michaelrowe01.com\/#website"},"breadcrumb":{"@id":"https:\/\/michaelrowe01.com\/index.php\/blog\/debug-with-structured-logging\/#breadcrumblist"},"author":{"@id":"https:\/\/michaelrowe01.com\/index.php\/author\/michaelrowe\/#author"},"creator":{"@id":"https:\/\/michaelrowe01.com\/index.php\/author\/michaelrowe\/#author"},"datePublished":"2023-06-06T21:21:38-04:00","dateModified":"2023-06-06T21:21:41-04:00"},{"@type":"WebSite","@id":"https:\/\/michaelrowe01.com\/#website","url":"https:\/\/michaelrowe01.com\/","name":"Random Thoughts","description":"A blog about things that interest me.","inLanguage":"en-US","publisher":{"@id":"https:\/\/michaelrowe01.com\/#organization"}}]},"og:locale":"en_US","og:site_name":"Random Thoughts | A blog about things that interest me.","og:type":"article","og:title":"Debug with Structured Logging | Random Thoughts","og:url":"https:\/\/michaelrowe01.com\/index.php\/blog\/debug-with-structured-logging\/","og:image":"https:\/\/michaelrowe01.com\/wp-content\/uploads\/2019\/04\/img_0391.jpg","og:image:secure_url":"https:\/\/michaelrowe01.com\/wp-content\/uploads\/2019\/04\/img_0391.jpg","og:image:width":3088,"og:image:height":2316,"article:published_time":"2023-06-07T01:21:38+00:00","article:modified_time":"2023-06-07T01:21:41+00:00","twitter:card":"summary","twitter:title":"Debug with Structured Logging | Random Thoughts","twitter:image":"https:\/\/michaelrowe01.com\/wp-content\/uploads\/2019\/04\/img_0391.jpg"},"aioseo_meta_data":{"post_id":"3057","title":null,"description":null,"keywords":[],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2023-06-07 01:21:07","updated":"2025-06-04 00:28:04","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/michaelrowe01.com\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/michaelrowe01.com\/index.php\/category\/blog\/\" title=\"blog\">blog<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tDebug with Structured Logging\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/michaelrowe01.com"},{"label":"blog","link":"https:\/\/michaelrowe01.com\/index.php\/category\/blog\/"},{"label":"Debug with Structured Logging","link":"https:\/\/michaelrowe01.com\/index.php\/blog\/debug-with-structured-logging\/"}],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2aMa8-Nj","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/posts\/3057","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/comments?post=3057"}],"version-history":[{"count":1,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/posts\/3057\/revisions"}],"predecessor-version":[{"id":3058,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/posts\/3057\/revisions\/3058"}],"wp:attachment":[{"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/media?parent=3057"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/categories?post=3057"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michaelrowe01.com\/index.php\/wp-json\/wp\/v2\/tags?post=3057"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}