Skip to content

Commit

Permalink
v1.2.1
Browse files Browse the repository at this point in the history
 - Fix [logger-mongo
#12](veliovgroup/Meteor-logger-mongo#12)
 - Finally fix #2
 - Minor code improvements
  • Loading branch information
dr-dimitru committed Jun 12, 2016
1 parent 0555bef commit a264ce4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .versions
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ [email protected]
[email protected]
[email protected]
ostrio:[email protected]
ostrio:[email protected].0
ostrio:[email protected].1
[email protected]
[email protected]
[email protected]
Expand Down
18 changes: 3 additions & 15 deletions loggerconsole.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -50,37 +50,23 @@ class LoggerConsole
error: (obj, message) ->
if obj.level is 'FATAL'
process.stdout.write colorize('red', colorize('bold', message)) + '\r\n'
if obj.data and not _.isEmpty obj.data
process.stdout.write JSON.stringify(obj.data, false, 2) + '\r\n'
else
process.stdout.write colorize('red', message) + '\r\n'
if obj.data and not _.isEmpty obj.data
process.stdout.write JSON.stringify(obj.data, false, 2) + '\r\n'
return
info: (obj, message) ->
process.stdout.write colorize('cyan', message) + '\r\n'
if obj.data and not _.isEmpty obj.data
process.stdout.write JSON.stringify(obj.data, false, 2) + '\r\n'
return
warn: (obj, message) ->
process.stdout.write colorize('magenta', message) + '\r\n'
if obj.data and not _.isEmpty obj.data
process.stdout.write JSON.stringify(obj.data, false, 2) + '\r\n'
return
debug: (obj, message) ->
process.stdout.write colorize('white', colorize('bold', message)) + '\r\n'
if obj.data and not _.isEmpty obj.data
process.stdout.write JSON.stringify(obj.data, false, 2) + '\r\n'
return
trace: (obj, message) ->
process.stdout.write colorize('blue', message) + '\r\n'
if obj.data and not _.isEmpty obj.data
process.stdout.write JSON.stringify(obj.data, false, 2) + '\r\n'
return
log: (obj, message) ->
process.stdout.write colorize('bold', message) + '\r\n'
if obj.data and not _.isEmpty obj.data
process.stdout.write JSON.stringify(obj.data, false, 2) + '\r\n'
return
else
self.cons =
Expand Down Expand Up @@ -148,7 +134,9 @@ class LoggerConsole
message = '%c' + _message + ''
else
if Meteor.isServer
message = '[' + obj.level + ': ' + obj.message + ' @ ' + obj.time + '] '
message = '[' + obj.level + ': ' + obj.message + ' @ ' + obj.time + '] ' + '\r\n'
if obj.data and not _.isEmpty obj.data
message += JSON.stringify(obj.data, false, 2) + '\r\n'
else
message = '%c[' + obj.level + ': ' + obj.message + ']'

Expand Down
2 changes: 1 addition & 1 deletion package.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package.describe({
name: 'ostrio:loggerconsole',
version: '1.2.0',
version: '1.2.1',
summary: 'Logging: Print Client\'s logs to Server\'s console, messages colorized for better readability',
git: 'https://github.com/VeliovGroup/Meteor-logger-console',
documentation: 'README.md'
Expand Down

0 comments on commit a264ce4

Please sign in to comment.