fgm / filog

A fine logger package for Meteor.JS applications (client + server)
GNU General Public License v3.0
18 stars 6 forks source link

Sometimes log object itself is the message #62

Closed arggh closed 6 years ago

arggh commented 6 years ago

I've no idea why, but sometimes I bump into logs where the message is the log document itself, like so:

{
    "_id": "PPP2whQ6gdC9Tfry2",
    "level": 3,
    "message": "{ level: 3,\n  context: \n   { message_details: { error: 'Updating subscription failed' },\n     browser: \n      { platform: 'Linux armv8l',\n        product: 'Gecko',\n        userAgent: 'Mozilla/5.0 (Linux; Android 8.0.0; SM-G950F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Mobile Safari/537.36',\n        performance: {} },\n     routing: { location: [Object] },\n     meteor: { platform: 'client', user: [Object] },\n     timestamp: { log: 1530510424060 } } }",
    "context": {
        "message_details": {
            "error": "Updating subscription failed"
        },
        "browser": {
            "platform": "Linux armv8l",
            "product": "Gecko",
            "userAgent": "Mozilla/5.0 (Linux; Android 8.0.0; SM-G950F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Mobile Safari/537.36",
            "performance": {}
        },
        "routing": {
            "location": {
...

Is this by design or perhaps a bug? FiLog version 0.1.17.

fgm commented 6 years ago

This is a message a client message (context includes browser), and the (message, context) has apparently been transmitted as a string and not split again on the server. It could be a bug, or due to the configuration of the client and server loggers. Can you add your configurations (editing out sentitive info), to see which processors, senders, etc this is using ?

arggh commented 6 years ago

Sorry, this definitely had nothing to do with FiLog.