Load winston and winston-papertrail on the server, then expose the log.it
method to the client. Logs pushed from the client include the user's IP and
userId
.
Out of the box, logs are sent to the console.
To add papertrail support set Meteor.settings.papertrail
like so:
{
host: '',
port: '',
}
-
log.it
level
string - the log level, from winston syslog levelsmessage
string - the message to logmeta
object - any additional meta data to log (limited to 10 fields)
-
log.count
message
string - the message or name of the countercount
integer - a positive number
-
log.value
message
string - the message or name of the valuevalue
float - the value to be logged
App.Log
- the winston instanceApp.Log.log(level, message)
App.Log.count(message, count)
- same as methodApp.Log.value(message, value)
- same as method