{"id":36158,"date":"2018-02-02T13:02:19","date_gmt":"2018-02-02T13:02:19","guid":{"rendered":"https:\/\/www.oik-plugins.com\/oik_api\/bw_trace\/"},"modified":"2018-02-02T13:03:50","modified_gmt":"2018-02-02T13:03:50","slug":"bw_trace","status":"publish","type":"oik_api","link":"https:\/\/www.oik-plugins.com\/oik_api\/bw_trace\/","title":{"rendered":"bw_trace() <span class=\"summary\">&#8211; Log a simple trace record to the trace log file if tracing is active<\/span>"},"content":{"rendered":"<!--more --><h2>Description<\/h2>Log a simple trace record to the trace log file if tracing is active <p>Use bw_trace2() in preference to bw_trace() except in special circumstances which prevent bw_trace2() from being invoked. <\/p><h2>Usage<\/h2><pre lang=PHP>bw_trace( $text, $function, $lineno, $file, $text_label, $level );<\/pre><h2>Parameters<\/h2><dl><dt>$text<\/dt><dd>( mixed ) <i>required<\/i>  &#8211; value to be traced  <\/dd><dt>$function<\/dt><dd>( string ) <i>optional<\/i> default: oiksc_dummy_function_0 &#8211; name of function to log in the trace file. In OO code use <strong>METHOD<\/strong>  <\/dd><dt>$lineno<\/dt><dd>( integer ) <i>optional<\/i> default: 2 &#8211; line number of source file to log  <\/dd><dt>$file<\/dt><dd>( string ) <i>optional<\/i> default: \/tmp\/oikscloaibmRqO &#8211; source file name  <\/dd><dt>$text_label<\/dt><dd>( string ) <i>optional<\/i>  &#8211; a label to help you locate the trace record  <\/dd><dt>$level<\/dt><dd>( integer ) <i>optional<\/i> default: BW_TRACE_ALWAYS &#8211; required level of tracing  <\/dd><\/dl><h2>Returns<\/h2><i>void<\/i> \n<h2>Source<\/h2>File name: oik\/libs\/bwtrace.php<br \/>Lines: <div class=\"bw_s2eofn\">1 to 6 of 6<\/div><pre><span class=\"T_WHITESPACE\">  <\/span><span class=\"T_FUNCTION\" id=\"1\">function<\/span><span class=\"T_WHITESPACE\" id=\"2\"> <\/span><span class=\"T_STRING\" id=\"3\">bw_trace<\/span><span>(<\/span><span class=\"T_WHITESPACE\" id=\"5\"> <\/span><span class=\"T_VARIABLE\" id=\"6\">$text<\/span><span>,<\/span><span class=\"T_WHITESPACE\" id=\"8\"> <\/span><span class=\"T_VARIABLE\" id=\"9\">$function<\/span><span>=<\/span><span class=\"T_FUNC_C\" id=\"11\">__FUNCTION__<\/span><span>,<\/span><span class=\"T_WHITESPACE\" id=\"13\"> <\/span><span class=\"T_VARIABLE\" id=\"14\">$lineno<\/span><span>=<\/span><span class=\"T_LINE\" id=\"16\">__LINE__<\/span><span>,<\/span><span class=\"T_WHITESPACE\" id=\"18\"> <\/span><span class=\"T_VARIABLE\" id=\"19\">$file<\/span><span>=<\/span><span class=\"T_FILE\" id=\"21\">__FILE__<\/span><span>,<\/span><span class=\"T_WHITESPACE\" id=\"23\"> <\/span><span class=\"T_VARIABLE\" id=\"24\">$text_label<\/span><span>=<\/span><span class=\"T_STRING\" id=\"26\">null<\/span><span>,<\/span><span class=\"T_WHITESPACE\" id=\"28\"> <\/span><span class=\"T_VARIABLE\" id=\"29\">$level<\/span><span>=<\/span><span class=\"T_STRING\" id=\"31\">BW_TRACE_ALWAYS<\/span><span class=\"T_WHITESPACE\" id=\"32\"> <\/span><span>)<\/span><span class=\"T_WHITESPACE\" id=\"34\"> <\/span><span>{<\/span><span class=\"T_WHITESPACE\" id=\"36\">\r\n    <\/span><span class=\"T_GLOBAL\" id=\"37\">global<\/span><span class=\"T_WHITESPACE\" id=\"38\"> <\/span><span class=\"T_VARIABLE\" id=\"39\">$bw_trace_on<\/span><span>,<\/span><span class=\"T_WHITESPACE\" id=\"41\"> <\/span><span class=\"T_VARIABLE\" id=\"42\">$bw_trace_level<\/span><span>;<\/span><span class=\"T_WHITESPACE\" id=\"44\">\r\n    <\/span><span class=\"T_IF\" id=\"45\">if<\/span><span class=\"T_WHITESPACE\" id=\"46\"> <\/span><span>(<\/span><span class=\"T_WHITESPACE\" id=\"48\"> <\/span><span class=\"T_VARIABLE\" id=\"49\">$bw_trace_on<\/span><span class=\"T_WHITESPACE\" id=\"50\"> <\/span><span class=\"T_BOOLEAN_AND\" id=\"51\">&amp;&amp;<\/span><span class=\"T_WHITESPACE\" id=\"52\"> <\/span><span>(<\/span><span class=\"T_WHITESPACE\" id=\"54\"> <\/span><span class=\"T_VARIABLE\" id=\"55\">$level<\/span><span class=\"T_WHITESPACE\" id=\"56\"> <\/span><span class=\"T_IS_SMALLER_OR_EQUAL\" id=\"57\">&lt;=<\/span><span class=\"T_WHITESPACE\" id=\"58\"> <\/span><span class=\"T_VARIABLE\" id=\"59\">$bw_trace_level<\/span><span class=\"T_WHITESPACE\" id=\"60\"> <\/span><span>)<\/span><span class=\"T_WHITESPACE\" id=\"62\">  <\/span><span>)<\/span><span class=\"T_WHITESPACE\" id=\"64\"> <\/span><span>{<\/span><span class=\"T_WHITESPACE\" id=\"66\">\r\n      <\/span><span class=\"T_STRING\" id=\"67\"><a href=\"\/oik_api\/bw_lazy_trace\/\" title=\"bw_lazy_trace() &#8211; Implement bw_trace() to write a record to the trace log file\">bw_lazy_trace<\/a><\/span><span>(<\/span><span class=\"T_WHITESPACE\" id=\"69\"> <\/span><span class=\"T_VARIABLE\" id=\"70\">$text<\/span><span>,<\/span><span class=\"T_WHITESPACE\" id=\"72\"> <\/span><span class=\"T_VARIABLE\" id=\"73\">$function<\/span><span>,<\/span><span class=\"T_WHITESPACE\" id=\"75\"> <\/span><span class=\"T_VARIABLE\" id=\"76\">$lineno<\/span><span>,<\/span><span class=\"T_WHITESPACE\" id=\"78\"> <\/span><span class=\"T_VARIABLE\" id=\"79\">$file<\/span><span>,<\/span><span class=\"T_WHITESPACE\" id=\"81\"> <\/span><span class=\"T_VARIABLE\" id=\"82\">$text_label<\/span><span>,<\/span><span class=\"T_WHITESPACE\" id=\"84\"> <\/span><span class=\"T_VARIABLE\" id=\"85\">$level<\/span><span class=\"T_WHITESPACE\" id=\"86\"> <\/span><span>)<\/span><span>;<\/span><span class=\"T_WHITESPACE\" id=\"89\">\r\n    <\/span><span>}<\/span><span class=\"T_WHITESPACE\" id=\"91\">  \r\n  <\/span><span>}<\/span><span class=\"T_WHITESPACE\" id=\"93\">\r\n<\/span>&nbsp;<\/pre><div class=\"page-numbers pagination\"><\/div>&nbsp;<a class=\"github\" href=\"https:\/\/github.com\/bobbingwide\/oik\/blob\/master\/libs\/bwtrace.php#L70\">View on GitHub<\/a>&nbsp;<a class=\"svn\" href=\"https:\/\/plugins.trac.wordpress.org\/browser\/oik\/trunk\/libs\/bwtrace.php#L70\">View on Trac<\/a><div class=\"bw_callers\"><h3 class=\"bw_callers\">Called by<\/h3><\/div><div class=\"bw_invokers\"><h3 class=\"bw_invokers\">Invoked by<\/h3><\/div><div class=\"bw_callees\"><h3 class=\"bw_callees\">Calls<\/h3><\/div><div class=\"bw_invokes\"><h3 class=\"bw_invokes\">Call hooks<\/h3><\/div>Not today thank you.","protected":false},"template":"","oik_letters":[517,512],"class_list":{"0":"post-36158","1":"oik_api","2":"type-oik_api","3":"status-publish","5":"oik_letters-b","6":"oik_letters-t","7":"entry"},"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>bw_trace() - Log a simple trace record to the trace log file if tracing is active - [oik] plugins.com<\/title>\n<meta name=\"description\" content=\"bw_trace Log a simple trace record to the trace log file if tracing is active oik\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.oik-plugins.com\/oik_api\/bw_trace\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"bw_trace() - Log a simple trace record to the trace log file if tracing is active - [oik] plugins.com\" \/>\n<meta property=\"og:description\" content=\"bw_trace Log a simple trace record to the trace log file if tracing is active oik\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.oik-plugins.com\/oik_api\/bw_trace\/\" \/>\n<meta property=\"og:site_name\" content=\"[oik] plugins.com\" \/>\n<meta property=\"article:modified_time\" content=\"2018-02-02T13:03:50+00:00\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.oik-plugins.com\/oik_api\/bw_trace\/\",\"url\":\"https:\/\/www.oik-plugins.com\/oik_api\/bw_trace\/\",\"name\":\"bw_trace() - Log a simple trace record to the trace log file if tracing is active - [oik] plugins.com\",\"isPartOf\":{\"@id\":\"https:\/\/www.oik-plugins.com\/#website\"},\"datePublished\":\"2018-02-02T13:02:19+00:00\",\"dateModified\":\"2018-02-02T13:03:50+00:00\",\"description\":\"bw_trace Log a simple trace record to the trace log file if tracing is active oik\",\"breadcrumb\":{\"@id\":\"https:\/\/www.oik-plugins.com\/oik_api\/bw_trace\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.oik-plugins.com\/oik_api\/bw_trace\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.oik-plugins.com\/oik_api\/bw_trace\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"APIs\",\"item\":\"https:\/\/www.oik-plugins.com\/?post_type=oik_api\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"bw_trace() &#8211; Log a simple trace record to the trace log file if tracing is active\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.oik-plugins.com\/#website\",\"url\":\"https:\/\/www.oik-plugins.com\/\",\"name\":\"[oik] plugins.com\",\"description\":\"WordPress plugins and themes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.oik-plugins.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"bw_trace() - Log a simple trace record to the trace log file if tracing is active - [oik] plugins.com","description":"bw_trace Log a simple trace record to the trace log file if tracing is active oik","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.oik-plugins.com\/oik_api\/bw_trace\/","og_locale":"en_US","og_type":"article","og_title":"bw_trace() - Log a simple trace record to the trace log file if tracing is active - [oik] plugins.com","og_description":"bw_trace Log a simple trace record to the trace log file if tracing is active oik","og_url":"https:\/\/www.oik-plugins.com\/oik_api\/bw_trace\/","og_site_name":"[oik] plugins.com","article_modified_time":"2018-02-02T13:03:50+00:00","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.oik-plugins.com\/oik_api\/bw_trace\/","url":"https:\/\/www.oik-plugins.com\/oik_api\/bw_trace\/","name":"bw_trace() - Log a simple trace record to the trace log file if tracing is active - [oik] plugins.com","isPartOf":{"@id":"https:\/\/www.oik-plugins.com\/#website"},"datePublished":"2018-02-02T13:02:19+00:00","dateModified":"2018-02-02T13:03:50+00:00","description":"bw_trace Log a simple trace record to the trace log file if tracing is active oik","breadcrumb":{"@id":"https:\/\/www.oik-plugins.com\/oik_api\/bw_trace\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.oik-plugins.com\/oik_api\/bw_trace\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.oik-plugins.com\/oik_api\/bw_trace\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"APIs","item":"https:\/\/www.oik-plugins.com\/?post_type=oik_api"},{"@type":"ListItem","position":2,"name":"bw_trace() &#8211; Log a simple trace record to the trace log file if tracing is active"}]},{"@type":"WebSite","@id":"https:\/\/www.oik-plugins.com\/#website","url":"https:\/\/www.oik-plugins.com\/","name":"[oik] plugins.com","description":"WordPress plugins and themes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.oik-plugins.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/oik_api\/36158","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/oik_api"}],"about":[{"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/types\/oik_api"}],"wp:attachment":[{"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/media?parent=36158"}],"wp:term":[{"taxonomy":"oik_letters","embeddable":true,"href":"https:\/\/www.oik-plugins.com\/wp-json\/wp\/v2\/oik_letters?post=36158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}