]>
git.r.bdr.sh - rbdr/cologne/blob - lib/formatters/ansi.js
4 // Load up dependencies
5 if (typeof require
=== 'function') {
7 var Ne
= require('neon');
10 Module
= global
.Module
;
14 Module(Cobalt
, 'Formatter')({});
16 Cobalt
.Formatter
.Ansi
= Module(Cobalt
.Formatter
, 'Ansi')({
17 format : function (logObject
, opts
){
21 indent
= Array(logObject
._indentLevel
+ 1).join(' ');
23 message
= indent
+ logObject
.message
;
25 switch(logObject
._level
) {
32 return message
.yellow
;
42 if (typeof require
=== 'function') {
43 global
.Ansi
= Cobalt
.Formatter
.Ansi
;
45 global
.Cobalt
.Formatter
.Ansi
= Cobalt
.Formatter
.Ansi
;
47 }(typeof window
!== 'undefined' ? window : (typeof exports
!== 'undefined' ? exports : self
)));