Permalink
Browse files

Move the logger function into core.

  • Loading branch information...
1 parent 39e4f37 commit 6ffcef9a95ee649bc10f453fde4eedc0d5efd46f @jcoglan jcoglan committed Mar 24, 2012
Showing with 4 additions and 5 deletions.
  1. +0 −1 examples/shared/public/index.html
  2. +0 −4 javascript/adapters/node_adapter.js
  3. +4 −0 javascript/faye.js
@@ -40,7 +40,6 @@
<script type="text/javascript">
Faye.Logging.logLevel = 'debug';
- Faye.logger = function(msg) { if (window.console) console.log(msg) };
var scheme = window.location.protocol,
host = location.hostname,
@@ -12,10 +12,6 @@ Faye.WebSocket = require('faye-websocket');
Faye.EventSource = Faye.WebSocket.EventSource;
Faye.CookieJar = require('cookiejar').CookieJar;
-Faye.logger = function(message) {
- console.log(message);
-};
-
Faye.withDataFor = function(transport, callback, context) {
var data = '';
transport.addListener('data', function(chunk) { data += chunk });
View
@@ -143,6 +143,10 @@ Faye.extend(Faye, {
return JSON.stringify(object);
},
+ logger: function(message) {
+ if (typeof console !== 'undefined') console.log(message);
+ },
+
timestamp: function() {
var date = new Date(),
year = date.getFullYear(),

0 comments on commit 6ffcef9

Please sign in to comment.