{"id":110,"date":"2008-05-27T16:08:59","date_gmt":"2008-05-27T15:08:59","guid":{"rendered":"http:\/\/www.ozone3d.net\/blogs\/lab\/?p=110"},"modified":"2014-02-01T14:03:57","modified_gmt":"2014-02-01T13:03:57","slug":"small-log-system","status":"publish","type":"post","link":"https:\/\/www.ozone3d.net\/blogs\/lab\/20080527\/small-log-system\/","title":{"rendered":"Small Log System"},"content":{"rendered":"<p>Here is a small piece of code that can be useful if you need to quickly generate traces (or log) in your apps:<\/p>\n<pre>\r\nclass cLog\r\n{\r\npublic:\r\n  cLog(char *logfile){};\r\n  static void trace(const char *s)\r\n  { if(s) log &lt;&lt;  s &lt;&lt; std::endl; };\r\n  static std::ofstream log;\r\n};\r\nstd::ofstream cLog::log(\"c:\\\\app_log.txt\");\r\n<\/pre>\n<p>Just use it as follows:<\/p>\n<pre>\r\ncLog::trace(\"this is a log\");\r\ncLog::trace(\"this is a second trace\");\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Here is a small piece of code that can be useful if you need to quickly generate traces (or log) in your apps: class cLog { public: cLog(char *logfile){}; static void trace(const char *s) { if(s) log &lt;&lt; s &lt;&lt; std::endl; }; static std::ofstream log; }; std::ofstream cLog::log(&#8220;c:\\\\app_log.txt&#8221;); Just use it as follows: cLog::trace(&#8220;this is a log&#8221;); cLog::trace(&#8220;this is a second trace&#8221;);<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[112,292,637,293],"class_list":["post-110","post","type-post","status-publish","format-standard","hentry","category-programming","tag-c","tag-log","tag-programming","tag-trace"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Here is a small piece of code that can be useful if you need to quickly generate traces (or log) in your apps: class cLog { public: cLog(char *logfile){}; static void trace(const char *s) { if(s) log\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"JeGX\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.ozone3d.net\/blogs\/lab\/20080527\/small-log-system\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"JeGX&#039;s Lab | News en vrac \/ WP sandbox\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Small Log System | JeGX&#039;s Lab\" \/>\n\t\t<meta property=\"og:description\" content=\"Here is a small piece of code that can be useful if you need to quickly generate traces (or log) in your apps: class cLog { public: cLog(char *logfile){}; static void trace(const char *s) { if(s) log\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.ozone3d.net\/blogs\/lab\/20080527\/small-log-system\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2008-05-27T15:08:59+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2014-02-01T13:03:57+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Small Log System | JeGX&#039;s Lab\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Here is a small piece of code that can be useful if you need to quickly generate traces (or log) in your apps: class cLog { public: cLog(char *logfile){}; static void trace(const char *s) { if(s) log\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/20080527\\\/small-log-system\\\/#article\",\"name\":\"Small Log System | JeGX's Lab\",\"headline\":\"Small Log System\",\"author\":{\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/author\\\/jegx\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/20080527\\\/small-log-system\\\/#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/84ced5670773799817f2f791816e1124fc739962b2fd55c366a685887c8287cd?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"JeGX\"},\"datePublished\":\"2008-05-27T16:08:59+01:00\",\"dateModified\":\"2014-02-01T14:03:57+01:00\",\"inLanguage\":\"en-US\",\"commentCount\":1,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/20080527\\\/small-log-system\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/20080527\\\/small-log-system\\\/#webpage\"},\"articleSection\":\"Programming, c++, log, Programming, trace\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/20080527\\\/small-log-system\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/category\\\/programming\\\/#listItem\",\"name\":\"Programming\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/category\\\/programming\\\/#listItem\",\"position\":2,\"name\":\"Programming\",\"item\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/category\\\/programming\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/20080527\\\/small-log-system\\\/#listItem\",\"name\":\"Small Log System\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/20080527\\\/small-log-system\\\/#listItem\",\"position\":3,\"name\":\"Small Log System\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/category\\\/programming\\\/#listItem\",\"name\":\"Programming\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/#person\",\"name\":\"JeGX\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/author\\\/jegx\\\/#author\",\"url\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/author\\\/jegx\\\/\",\"name\":\"JeGX\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/20080527\\\/small-log-system\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/84ced5670773799817f2f791816e1124fc739962b2fd55c366a685887c8287cd?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"JeGX\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/20080527\\\/small-log-system\\\/#webpage\",\"url\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/20080527\\\/small-log-system\\\/\",\"name\":\"Small Log System | JeGX's Lab\",\"description\":\"Here is a small piece of code that can be useful if you need to quickly generate traces (or log) in your apps: class cLog { public: cLog(char *logfile){}; static void trace(const char *s) { if(s) log\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/20080527\\\/small-log-system\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/author\\\/jegx\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/author\\\/jegx\\\/#author\"},\"datePublished\":\"2008-05-27T16:08:59+01:00\",\"dateModified\":\"2014-02-01T14:03:57+01:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/#website\",\"url\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/\",\"name\":\"JeGX's Lab\",\"alternateName\":\"The Infamous Lab\",\"description\":\"News en vrac \\\/ WP sandbox\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.ozone3d.net\\\/blogs\\\/lab\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Small Log System | JeGX's Lab","description":"Here is a small piece of code that can be useful if you need to quickly generate traces (or log) in your apps: class cLog { public: cLog(char *logfile){}; static void trace(const char *s) { if(s) log","canonical_url":"https:\/\/www.ozone3d.net\/blogs\/lab\/20080527\/small-log-system\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/20080527\/small-log-system\/#article","name":"Small Log System | JeGX's Lab","headline":"Small Log System","author":{"@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/author\/jegx\/#author"},"publisher":{"@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/20080527\/small-log-system\/#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/84ced5670773799817f2f791816e1124fc739962b2fd55c366a685887c8287cd?s=96&d=mm&r=g","width":96,"height":96,"caption":"JeGX"},"datePublished":"2008-05-27T16:08:59+01:00","dateModified":"2014-02-01T14:03:57+01:00","inLanguage":"en-US","commentCount":1,"mainEntityOfPage":{"@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/20080527\/small-log-system\/#webpage"},"isPartOf":{"@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/20080527\/small-log-system\/#webpage"},"articleSection":"Programming, c++, log, Programming, trace"},{"@type":"BreadcrumbList","@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/20080527\/small-log-system\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.ozone3d.net\/blogs\/lab#listItem","position":1,"name":"Home","item":"https:\/\/www.ozone3d.net\/blogs\/lab","nextItem":{"@type":"ListItem","@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/category\/programming\/#listItem","name":"Programming"}},{"@type":"ListItem","@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/category\/programming\/#listItem","position":2,"name":"Programming","item":"https:\/\/www.ozone3d.net\/blogs\/lab\/category\/programming\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/20080527\/small-log-system\/#listItem","name":"Small Log System"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.ozone3d.net\/blogs\/lab#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/20080527\/small-log-system\/#listItem","position":3,"name":"Small Log System","previousItem":{"@type":"ListItem","@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/category\/programming\/#listItem","name":"Programming"}}]},{"@type":"Person","@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/#person","name":"JeGX"},{"@type":"Person","@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/author\/jegx\/#author","url":"https:\/\/www.ozone3d.net\/blogs\/lab\/author\/jegx\/","name":"JeGX","image":{"@type":"ImageObject","@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/20080527\/small-log-system\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/84ced5670773799817f2f791816e1124fc739962b2fd55c366a685887c8287cd?s=96&d=mm&r=g","width":96,"height":96,"caption":"JeGX"}},{"@type":"WebPage","@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/20080527\/small-log-system\/#webpage","url":"https:\/\/www.ozone3d.net\/blogs\/lab\/20080527\/small-log-system\/","name":"Small Log System | JeGX's Lab","description":"Here is a small piece of code that can be useful if you need to quickly generate traces (or log) in your apps: class cLog { public: cLog(char *logfile){}; static void trace(const char *s) { if(s) log","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/#website"},"breadcrumb":{"@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/20080527\/small-log-system\/#breadcrumblist"},"author":{"@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/author\/jegx\/#author"},"creator":{"@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/author\/jegx\/#author"},"datePublished":"2008-05-27T16:08:59+01:00","dateModified":"2014-02-01T14:03:57+01:00"},{"@type":"WebSite","@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/#website","url":"https:\/\/www.ozone3d.net\/blogs\/lab\/","name":"JeGX's Lab","alternateName":"The Infamous Lab","description":"News en vrac \/ WP sandbox","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.ozone3d.net\/blogs\/lab\/#person"}}]},"og:locale":"en_US","og:site_name":"JeGX's Lab | News en vrac \/ WP sandbox","og:type":"article","og:title":"Small Log System | JeGX's Lab","og:description":"Here is a small piece of code that can be useful if you need to quickly generate traces (or log) in your apps: class cLog { public: cLog(char *logfile){}; static void trace(const char *s) { if(s) log","og:url":"https:\/\/www.ozone3d.net\/blogs\/lab\/20080527\/small-log-system\/","article:published_time":"2008-05-27T15:08:59+00:00","article:modified_time":"2014-02-01T13:03:57+00:00","twitter:card":"summary","twitter:title":"Small Log System | JeGX's Lab","twitter:description":"Here is a small piece of code that can be useful if you need to quickly generate traces (or log) in your apps: class cLog { public: cLog(char *logfile){}; static void trace(const char *s) { if(s) log"},"aioseo_meta_data":{"post_id":"110","title":null,"description":null,"keywords":null,"keyphrases":null,"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":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"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":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"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":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-03-08 08:10:27","updated":"2025-11-24 12:19:56","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.ozone3d.net\/blogs\/lab\" 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:\/\/www.ozone3d.net\/blogs\/lab\/category\/programming\/\" title=\"Programming\">Programming<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tSmall Log System\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.ozone3d.net\/blogs\/lab"},{"label":"Programming","link":"https:\/\/www.ozone3d.net\/blogs\/lab\/category\/programming\/"},{"label":"Small Log System","link":"https:\/\/www.ozone3d.net\/blogs\/lab\/20080527\/small-log-system\/"}],"views":536,"_links":{"self":[{"href":"https:\/\/www.ozone3d.net\/blogs\/lab\/wp-json\/wp\/v2\/posts\/110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ozone3d.net\/blogs\/lab\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ozone3d.net\/blogs\/lab\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ozone3d.net\/blogs\/lab\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ozone3d.net\/blogs\/lab\/wp-json\/wp\/v2\/comments?post=110"}],"version-history":[{"count":0,"href":"https:\/\/www.ozone3d.net\/blogs\/lab\/wp-json\/wp\/v2\/posts\/110\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ozone3d.net\/blogs\/lab\/wp-json\/wp\/v2\/media?parent=110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ozone3d.net\/blogs\/lab\/wp-json\/wp\/v2\/categories?post=110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ozone3d.net\/blogs\/lab\/wp-json\/wp\/v2\/tags?post=110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}