<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Sets the debugging level for the library</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="zookeeper.setacl.html">Zookeeper::setAcl</a></div> <div class="next" style="text-align: right; float: right;"><a href="zookeeper.setdeterministicconnorder.html">Zookeeper::setDeterministicConnOrder</a></div> <div class="up"><a href="class.zookeeper.html">Zookeeper</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="zookeeper.setdebuglevel" class="refentry"> <div class="refnamediv"> <h1 class="refname">Zookeeper::setDebugLevel</h1> <p class="verinfo">(PECL zookeeper >= 0.1.0)</p><p class="refpurpose"><span class="refname">Zookeeper::setDebugLevel</span> — <span class="dc-title">Sets the debugging level for the library</span></p> </div> <div class="refsect1 description" id="refsect1-zookeeper.setdebuglevel-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="modifier">static</span> <span class="type">bool</span> <span class="methodname"><strong>Zookeeper::setDebugLevel</strong></span> ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$logLevel</code></span> )</div> </div> <div class="refsect1 parameters" id="refsect1-zookeeper.setdebuglevel-parameters"> <h3 class="title">Parameters</h3> <dl> <dt> <code class="parameter">logLevel</code></dt> <dd> <p class="para"> ZooKeeper log level constants. </p> </dd> </dl> </div> <div class="refsect1 returnvalues" id="refsect1-zookeeper.setdebuglevel-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure. </p> </div> <div class="refsect1 errors" id="refsect1-zookeeper.setdebuglevel-errors"> <h3 class="title">Errors/Exceptions</h3> <p class="para"> This method emits PHP error/warning when parameters count or types are wrong or fail to set debug level. </p> <div class="caution"><strong class="caution">Caution</strong> <p class="para"> Since version 0.3.0, this method emits <strong class="classname">ZookeeperException</strong> and it's derivatives. </p> </div> </div> <div class="refsect1 examples" id="refsect1-zookeeper.setdebuglevel-examples"> <h3 class="title">Examples</h3> <div class="example" id="example-5847"> <p><strong>Example #1 <span class="methodname"><strong>Zookeeper::setDebugLevel()</strong></span> example</strong></p> <div class="example-contents"><p> Set debugl level. </p></div> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br />$r </span><span style="color: #007700">= </span><span style="color: #0000BB">Zookeeper</span><span style="color: #007700">::</span><span style="color: #0000BB">setDebugLevel</span><span style="color: #007700">(</span><span style="color: #0000BB">Zookeeper</span><span style="color: #007700">::</span><span style="color: #0000BB">LOG_LEVEL_WARN</span><span style="color: #007700">);<br />if (</span><span style="color: #0000BB">$r</span><span style="color: #007700">)<br /> echo </span><span style="color: #DD0000">'SUCCESS'</span><span style="color: #007700">;<br />else<br /> echo </span><span style="color: #DD0000">'ERR'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?><br /></span>?></span> </code></div> </div> <div class="example-contents"><p>The above example will output:</p></div> <div class="example-contents screen"> <div class="cdata"><pre> SUCCESS </pre></div> </div> </div> </div> <div class="refsect1 seealso" id="refsect1-zookeeper.setdebuglevel-seealso"> <h3 class="title">See Also</h3> <ul class="simplelist"> <li class="member"><a href="class.zookeeper.html#zookeeper.class.constants.log-levels" class="link">ZooKeeper Log Levels</a></li> <li class="member"><strong class="classname">ZookeeperException</strong></li> </ul> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="zookeeper.setacl.html">Zookeeper::setAcl</a></div> <div class="next" style="text-align: right; float: right;"><a href="zookeeper.setdeterministicconnorder.html">Zookeeper::setDeterministicConnOrder</a></div> <div class="up"><a href="class.zookeeper.html">Zookeeper</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>