<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>BlackBerry Developer Blog &#187; logging</title>
	<atom:link href="http://devblog.blackberry.com/tag/logging/feed/" rel="self" type="application/rss+xml" />
	<link>http://devblog.blackberry.com</link>
	<description></description>
	<lastBuildDate>Tue, 18 Jun 2013 16:50:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='devblog.blackberry.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/9ef0a66c09615fa946c4179662398878?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>BlackBerry Developer Blog &#187; logging</title>
		<link>http://devblog.blackberry.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://devblog.blackberry.com/osd.xml" title="BlackBerry Developer Blog" />
	<atom:link rel='hub' href='http://devblog.blackberry.com/?pushpress=hub'/>
		<item>
		<title>Console Logging on the BlackBerry 10 Native SDK Beta 3</title>
		<link>http://devblog.blackberry.com/2012/10/blackberry-10-sdk-console-logging/</link>
		<comments>http://devblog.blackberry.com/2012/10/blackberry-10-sdk-console-logging/#comments</comments>
		<pubDate>Wed, 24 Oct 2012 13:59:00 +0000</pubDate>
		<dc:creator>garett</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Native SDK Development]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Console]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[QML]]></category>
		<category><![CDATA[qt]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=11760</guid>
		<description><![CDATA[By Tehdog (Own work) [CC0], via Wikimedia Commons (Mute_Icon.svg, Speaker Icon.svg) Some of you may have noticed that the Beta 3 release of the BlackBerry® 10 Native SDK got a bit quieter in the console when creating Cascades™ applications. As of Qt 4.8.3, all output that used to code to the console (qDebug(), qWarning(), qCritical() [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=11760&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:center;"><img class="aligncenter size-full wp-image-11761" alt="TITLE_IMAGE" src="http://rimdevblog.files.wordpress.com/2012/10/console-logging.jpg?w=403&#038;h=187" height="187" width="403" /></p>
<p style="text-align:center;"><i>By Tehdog (Own work) [CC0], via Wikimedia Commons (<a href="http://upload.wikimedia.org/wikipedia/commons/3/3f/Mute_Icon.svg" target="_new">Mute_Icon.svg</a>, <a href="http://upload.wikimedia.org/wikipedia/commons/2/21/Speaker_Icon.svg" target="_new">Speaker Icon.svg</a>)</i></p>
<p>Some of you may have noticed that the Beta 3 release of the BlackBerry® 10 Native SDK got a bit quieter in the console when creating Cascades™ applications. As of Qt 4.8.3, all output that used to code to the console (qDebug(), qWarning(), qCritical() etc) is now output to slog2. This not only affects the logging from C++ but also any console.log() JavaScript logging done from within QML as well as error messages at runtime. No console output can make troubleshooting even simple issues very frustrating. Luckily there are a few workarounds detailed in the “Known limitations” section of the <a href="https://developer.blackberry.com/cascades/download/releasenotes/" target="_new">release notes</a> that can get you access to the logging information.</p>
<p><span id="more-11760"></span></p>
<p>1) This workaround gets you the logging information back to the console, but should be removed prior to publishing your application to the BlackBerry App World™ storefront. Either of the following can be done:</p>
<p>a. Use the fprintf() function with stdout or stderr as the output stream to receive output directly to the console. This is easy to do to add in-line console output from C++, but will not restore logging to the console from QML.<br />
ex fprintf(stdout, &#8220;I am a console message\n&#8221;);</p>
<p>b. Register your own message handler with the application to have all qDebug() (etc) and QML output handled however you wish (including using fprintf() as mentioned above). To do this, open your main.cpp file (the default main file for a Cascades application) and add a function similar to the following above the main method:</p>
<pre>void myMessageOutput(QtMsgType type, const char* msg){
               fprintf(stdout, "%s\n", msg);
               fflush(stdout);
}</pre>
<p>Then in the main method we need to register the above method as a message handler:</p>
<pre>int main(int argc, char **argv)
{
    Application app(argc, argv);
    qInstallMsgHandler(myMessageOutput);
    ...
}</pre>
<p>After this is done you will once again have console output!</p>
<p>2) To see debug information that is output from qDebug(), you can access the slogger2 logs as follows:</p>
<p>In the IDE, in the Target Navigator view, right-click the device target. Click Launch SSH Session.</p>
<p>In the terminal that appears, do one of the following:</p>
<ul>
<li>To view the current slogger2 logs, type slog2info.</li>
<li>To view real-time output for the processes that are being debugged (for applications that are running in development mode), type slog2info -w.</li>
<li>To view help information on slogger2, type slog2info -h.</li>
</ul>
<p>You can also access the log files directly in the /tmp/slogger22 on the device and run these logs through slog2info at a later time.</p>
<p>This works well to retrieve all logs, but has a bit more overhead than option 1b) and also does not allow you to see the logs in the console.</p>
<p>Now you have a few options to get access to the application logs, which can be used in the interim until a solution comes in a future NDK release and the above workarounds are no longer needed.</p>
<p>The workarounds mentioned above are also covered in the following places:</p>
<ul>
<li><a href="https://developer.blackberry.com/cascades/download/releasenotes/" target="_new">Cascades Beta 3 &#8211; Release Notes</a></li>
<li><a href="https://developer.blackberry.com/cascades/documentation/dev/upgrading/momenticschanges.html" target="_new">Upgrading to Beta 3 &#8211; QNX Momentics IDE changes</a></li>
<li><a href="https://developer.blackberry.com/cascades/documentation/getting_started/tools/debug_and_profile.html" target="_new">Getting Started &#8211; Debugging and profiling</a></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/11760/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/11760/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=11760&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2012/10/blackberry-10-sdk-console-logging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75e7e69af37da351a3462a17576c2209?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gbeuk</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2012/10/console-logging.jpg" medium="image">
			<media:title type="html">TITLE_IMAGE</media:title>
		</media:content>
	</item>
		<item>
		<title>Eclipse and Super Apps are Key for ekkes-corner</title>
		<link>http://devblog.blackberry.com/2011/10/developer-success-story-ekkes-corner/</link>
		<comments>http://devblog.blackberry.com/2011/10/developer-success-story-ekkes-corner/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 13:59:44 +0000</pubDate>
		<dc:creator>Luke Reimer</dc:creator>
				<category><![CDATA[Case Studies & Success Stories]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[Dev Con]]></category>
		<category><![CDATA[DevCon 2011]]></category>
		<category><![CDATA[developer success]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[ekkes-corner]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[push]]></category>
		<category><![CDATA[super apps]]></category>

		<guid isPermaLink="false">http://devblog.blackberry.com/?p=7213</guid>
		<description><![CDATA[Read about some of the BlackBerry app development successes of Ekkehard (Ekke) Gentz of ekkes-corner.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=7213&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img src="http://rimdevblog.files.wordpress.com/2011/09/devconamericas_banner_468x60.jpg?w=468&#038;h=60" alt="BlackBerry DevCon Americas Speaker" title="BlackBerry DevCon Americas Speaker" width="468" height="60" class="aligncenter size-full wp-image-7060" /></p>
<p><strong>COM26 &#8211; Logging: The Easy, Flexible Way</strong><br />
<i>Logging is a powerful instrument to find bugs and understand why an application is under-performing or why something went wrong.</i></p>
<p><i>Ekkehard Gentz, Software Architect with ekkes-corner</i></p>
<p><a href="http://www.blackberrydevcon.com/americas/registration" target="_new">Register for BlackBerry DevCon Americas now!</a></p>
<hr />
<p>In an industry full of young up-and-comers, <a href="http://ekkescorner.wordpress.com/" target="_new">Ekkehard (Ekke) Gentz</a> stands out for his 30 years of experience and insight in the rapidly changing world of mobile development. In 2010, Ekke realized that he could meet many of his customer’s needs with mobile business applications for BlackBerry® smartphones as part of his enterprise business applications. Using Java® and BlackBerry® 6, Ekke develops client software and server software for small -and medium-sized companies. Ekke is also very involved in the Eclipse community.</p>
<p>Ekke talked to us about why the BlackBerry solution is right for his customers, how BlackBerry 6 and BlackBerry® 7 have led to the design of powerful apps, and how “Super Apps” are a key differentiator.</p>
<p><strong>Why do you recommend the BlackBerry solution to so many of your customers?</strong><br />
I always go as deep as possible into frameworks, platforms, and technologies to find the best mobile solution for my customers, and I’ve found that there are a number of customer requirements that I can only solve using the BlackBerry solution. The combination of integrated native solutions like the BlackBerry Push service, the BlackBerry® Enterprise Server, and GPS functionality have been hugely important to some of my customers.  I’m astonished how many times I discover that a customer’s special requirements can only be solved using the BlackBerry solution.</p>
<p><strong>Why do you like working with BlackBerry 6 and BlackBerry 7?</strong><br />
Whenever I speak to Java developers or Eclipse developers, I explain to them that with the BlackBerry OS it’s easy to use your experience to develop really great-looking applications with all of the unique features of BlackBerry smartphones. The Research In Motion® (RIM®) team added more APIs and extended Java Specification Requests (JSRs) to make it easier for Java developers, and the BlackBerry 6 applications are oftentimes much more engaging than similar iOS applications because of its deep integration with the native app. Also, the command framework for Super Apps is designed to be straightforward. It’s a great way to work with applications communicating with each other, and it’s very powerful.</p>
<p><span id="more-7213"></span></p>
<p><strong>Do you have a specific example of using Super Apps to help optimize business processes?</strong><br />
One example is the location-based services and GPS tracker. SQLite is a database for mobile devices that is designed to allow access from one application at a time. To solve the issue of both apps needing to access the SQLite database at the same time, the background app registers its services as remote commands using the BlackBerry Command Framework API. The foreground apps then use these commands to communicate with the background apps. This works really well and isn’t something that I could do easily with Windows Phone 7, iOS or Android™.</p>
<p><strong>How important is the BlackBerry Java Plug-in for Eclipse?</strong><br />
Using BlackBerry 6 and BlackBerry 7 with the BlackBerry® Java® Plug-in for Eclipse® definitely makes it easier to work with Eclipse, especially for users who are not as familiar with it. I work with it daily and it was the reason why I developed an Eclipse-based OSGi server with Eclipse Jetty.  I integrated OsGi services that were using the BlackBerry Push SDK, which made it possible to install both the mobile software and server software &#8212; including all of the Push services &#8212; in one Eclipse installation. This was much simpler than having to install the normal BlackBerry Push SDK with the J2EE Stack and Spring framework. </p>
<p><strong>How does your logging framework function?</strong><br />
I try to avoid using debuggers unless there are serious problems, because they don’t give you the real behavior of an application. I didn’t want to use a debugger or an event log. In the past I had used an open source logging monitor that was easy to use with applications and allowed me to search for and see debugger warnings.  For BlackBerry smartphones, my logging works in the background; it’s a library, and it’s designed to be easy to implement. If I have a foreground application and a background application and my server application pushing content through the BlackBerry smartphone, I can go into this logging monitor and see side-by-side what happens in both apps on the server side.</p>
<p><strong>Thanks for taking the time to talk to us, Ekke!  Readers, please take the time to check out <a href="http://ekkescorner.wordpress.com/" target="_new">Ekke’s website</a> and all the cool projects he’s currently working on.</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rimdevblog.wordpress.com/7213/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rimdevblog.wordpress.com/7213/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.blackberry.com&#038;blog=17235680&#038;post=7213&#038;subd=rimdevblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.blackberry.com/2011/10/developer-success-story-ekkes-corner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/02798908b6c8de45a0e4aa8531a6d869?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">lukereim1</media:title>
		</media:content>

		<media:content url="http://rimdevblog.files.wordpress.com/2011/09/devconamericas_banner_468x60.jpg" medium="image">
			<media:title type="html">BlackBerry DevCon Americas Speaker</media:title>
		</media:content>
	</item>
	</channel>
</rss>
