aboutsummaryrefslogtreecommitdiff
path: root/lib/formatters/simple.js
diff options
context:
space:
mode:
authorBen Beltran <ben@freshout.us>2014-03-20 10:27:45 -0600
committerBen Beltran <ben@freshout.us>2014-03-20 10:27:45 -0600
commita181aeae67a9c9c86e9df92ab5c0de6ce00f47fb (patch)
tree14573b00ea3b9538b5875d5745b1f89d5d2a32d5 /lib/formatters/simple.js
parent26b061b8b81f39ad11fbd9c6c761ec3e699dbad2 (diff)
Cobalt 2.0 -> Now with neon 2.0
Diffstat (limited to 'lib/formatters/simple.js')
-rw-r--r--lib/formatters/simple.js31
1 files changed, 5 insertions, 26 deletions
diff --git a/lib/formatters/simple.js b/lib/formatters/simple.js
index 24f65b3..6d2ad7d 100644
--- a/lib/formatters/simple.js
+++ b/lib/formatters/simple.js
@@ -1,30 +1,9 @@
-(function (global) {
- var Module;
-
- // Load up dependencies
- if (typeof require === 'function') {
- var Ne = require('neon');
- Module = Ne.Module;
- } else {
- Module = global.Module;
- }
-
- var Cobalt = {};
- Module(Cobalt, 'Formatter')({});
-
- Cobalt.Formatter.Simple = Module(Cobalt.Formatter, 'Simple')({
+Module(Cobalt.Formatter, 'Simple')({
format : function (logObject, opts){
- var indent;
+ var indent;
- indent = Array(logObject._indentLevel + 1).join(' ');
+ indent = Array(logObject._indentLevel + 1).join(' ');
- return indent + logObject.message;
+ return indent + logObject.message;
}
- });
-
- if (typeof require === 'function') {
- global.Simple = Cobalt.Formatter.Simple;
- } else {
- global.Cobalt.Formatter.Simple = Cobalt.Formatter.Simple;
- }
-}(typeof window !== 'undefined' ? window : (typeof exports !== 'undefined' ? exports : self)));
+});