]>
git.r.bdr.sh - rbdr/cologne/blob - lib/loggers/socket.js
4 // Load up dependencies
5 if (typeof require
=== 'function') {
6 var Ne
= require('neon');
10 Module
= global
.Module
;
15 Module(Cobalt
, 'Logger')({});
17 Cobalt
.Logger
.Socket
= Class(Cobalt
.Logger
, 'Socket')({
22 this._socket
= io
.connect(this.serverUrl
);
26 var i
, messageArray
= [];
28 for (i
= 0; i
< arguments
.length
; i
++) {
29 messageArray
.push(arguments
[i
]);
32 this._socket
.emit('log', messageArray
);
37 if (Cobalt
.Logger
.Socket
.__objectSpy
) {
38 Cobalt
.Logger
.Socket
.__objectSpy
.destroy();
41 if (typeof require
=== 'function') {
42 global
.Socket
= Cobalt
.Logger
.Socket
;
44 global
.Cobalt
.Logger
.Socket
= Cobalt
.Logger
.Socket
;
46 }(typeof window
!== 'undefined' ? window : (typeof exports
!== 'undefined' ? exports : self
)));