Skip to content

Commit

Permalink
Merge pull request #360 from divineprog/ThreeTwoOne
Browse files Browse the repository at this point in the history
MOSYNC-2770: Renamed debug log function from mosync.app.log() to mosync.log()
  • Loading branch information
Ali Sarrafi committed Feb 12, 2013
2 parents 0afe3d2 + 727482f commit 5a271e6
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions libs/Wormhole/jslib/mosync-bridge.js
Expand Up @@ -48,6 +48,17 @@ var mosync = (function()
mosync.isWindowsPhone =
navigator.userAgent.indexOf("Windows Phone OS") != -1;

// Logging support.

/**
* Write log output using maWriteLog in the MoSync C++ API.
* @param s Log message string.
*/
mosync.log = function(s)
{
mosync.bridge.send(["MoSync", "SysLog", s]);
};

// Application functions.

mosync.app = {};
Expand All @@ -69,15 +80,6 @@ var mosync = (function()
mosync.bridge.send(["MoSync", "SendToBackground"]);
};

/**
* Writes log output using MoSync API syscall maWriteLog.
* @param s Log message string.
*/
mosync.app.log = function(s)
{
mosync.bridge.send(["MoSync", "SysLog", s]);
};

/**
* Screen orientation constants.
*/
Expand Down Expand Up @@ -228,7 +230,7 @@ var mosync = (function()
{
console.log = function(s)
{
mosync.app.log(s);
mosync.log(s);
};
}

Expand Down

0 comments on commit 5a271e6

Please sign in to comment.