@arggh regarding env variables, these are no longer necessary, it was in an earlier version: all config is explicit in the application.
Regarding the logging server, the setup you describe should work, but I think it would be more efficient to have each application server receive its logs and send to a local rsyslog/syslog-ng using the SyslogSender. From there, there heavy production code from these and the File Beat on each of these servers can ship the syslog files through LogStash at whatever scale you need. Iād rather avoid a meteor app server do this kind of centralization when it can be done in pure C code by a long-time-production-quality code like rsyslog.
If you go either way, Iād be interested in the results.
Sorry for my newbie question: I have trouble adding the package to my project. Whatās the full package name besides filog that can be used in meteor add ā¦ for installation?
I wanted to try the filog package but I canāt install it on my Windows development platform. I get an error message when I run meteor npm install --save filog that says āUnsupported platformā.
Production environment is linux, but I of course would want to see that it works locally before deployment. Can the problem be fixed?
I need simple logging that will save server errors to a file on my production server so I can see why itās crashing (works fine on the dev machine). Filog sounds good but I canāt figure out how to get started with it. The documentationā is just a list of js filenames. I donāt understand from the README how to use it e.g. where would logs be stored? I must be missing something really basic about what a logger is and how it is expected to work? Thanks for any help.
Hmm, that looks potentially dangerous if your logs will be viewable in the client-side database. Iād prefer something that just saves a file on the server - and I still donāt understand how to use it from the README. I also canāt tell whether it only logs your custom messages, or all server console output.
FiLog only does so, if you configure it to do so. You can also send them to a syslog server, console etc., but you can also just extend it and do whatever you want with the logs.
For that to happen you need to have a publication setup that ships those docs to clients - nothing besides the userās profile from your database is sent to the client by default (I hope, do check that you donāt have autopublish installed).
You can call logger.arm() to make the FiLog logger catch exceptions and log them, but if you just call console.log('cowabunga'); in your code, itās got nothing to do with FiLog.
@arggh, thank you for the information, it sounds like Filog may be what I need. However I tried to install Filog under Linux Mint Cinnamon with the command recommended above (shouldnāt this be in the README?):
meteor npm install --save filog
But I got errors:
bcrypt_lib.target.mk:97: recipe for target 'Release/obj.target/bcrypt_lib/src/blowfish.o' failed
make: *** [Release/obj.target/bcrypt_lib/src/blowfish.o] Error 127
make: Leaving directory '/home/username/Meteor/myapp/node_modules/filog/node_modules/bcrypt/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/username/.meteor/packages/meteor-tool/.1.6.0_1.f9l6vk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.4.0-53-generic
gyp ERR! command "/home/username/.meteor/packages/meteor-tool/.1.6.0_1.f9l6vk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node" "/home/username/.meteor/packages/meteor-tool/.1.6.0_1.f9l6vk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/username/Meteor/myapp/node_modules/filog/node_modules/bcrypt
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/home/username/Meteor/myapp/package.json'
npm WARN myapp No description
npm WARN myapp No repository field.
npm WARN myapp No README data
npm WARN myapp No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt@0.8.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@0.8.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
@awatson1978 : did you have a chance to examine filog since then ? As the package maintainer, Iād be really interested to have feedback from someone who examined alternatives.
It should be able to log to Loggly with minimal effort, since it includes syslog, or a loggly āSenderā could be added.
This topic is a few years old, and so are several of the packages mentioned. Curious if others interested in logging for Meteor have updated recommendations with the move to async/await?
Great choice! Let me know if you have any issues using ostrio:logger with meteor@3 Iāll quickly patch it. Also have plans to add Redis Storage Adapter, lmk if Redis would be useful for this package