transported log always shows 'server', even if msg originates from client
edovino opened this issue · 3 comments
edovino commented
I guess that is to be expected (since the logging of the transported message does happen on the server), but can I configure the logging system so it shows the origin of the log event?
dr-dimitru commented
Hello @edovino ,
You're right, logging request is transferred from Client to Server.
I recommend to set caller side in data
param:
log.info('message', {
caller: (Meteor.isServer) ? 'Server' : 'Client'
}, 'userId');
Let me know if it is helpful.
edovino commented
yes - that will work perfectly! I'll make a wrapper to set 'data.caller
' automatically, and use that in the format()
function in the LoggerConsole
adapter.
thx!
dr-dimitru commented
@edovino great, I'm glad it worked for you.
Please, support this project by:
- Star on GitHub
- Star on Atmosphere
- Check other packages we have made