Copy link to clipboard
Copied
My company is looking at ways to log and trace our apps which range from Coldfusion, react, and node js applications. We want to log when pages are spent up to actions the end-user performed to errors.
My question what are some of the solutions that are a standard way across the board to handle application logging?
Copy link to clipboard
Copied
There are different expectations that different people will have about logging, and what is "standard", so you may want to add some clarification.
Of course, your web server will log every request made to CF (or for another server-side file). CF does not itself log every request (though that can be enabled via the underlying Tomcat "valve", as discussed here and elsewhere).
Some may interpret your question in such a way as to propose how CF does have a cflog tag (and writelog function), and these can be used within your app to write anything to a log (stored in the CF "logs" folder). But it's not clear to me if that's what you seek. (Someone may want to point out also that you could do such logging at the start and end of your request, via the methods in application.cfc or via the pairing of application.cfm and onrequestend.cfm).
Finally, it may be worth noting that various apm's (app perf monitoring) tools often offer their own API that you can call to have THEM log things, and that may be more compelling when folks want to "trace across apps", if all such apps are being monitored by such an APM. (And FWIW, FusionReactor, the monitor for CF, has an API of its own, FRAPI, that can offer additional logging, tracing, and custom metrics.)
So while my instinct is to say there is no "standard way" to handle "application logging", beyond the above, let's see what others may add, or what you may well respond with, to see if we need to go still further.
Copy link to clipboard
Copied
I would suggest you design your system as follows:
Install a central log analysis tool that uses as input the log files from 1., 2. and 3. Some log analysis tools are Open Source.
Copy link to clipboard
Copied
Thanks for that info charlie and bkbk.
After having a few meetings with my team and seeing what they are looking for, I proposed that we have an independent app that just writes logs. The way it works is we can include an HTTP async(send and forget it) post to an API logging app that way we can catch whatever the apps sends, may it be from cold fusion, node, etc. but didn't know if there was an out of box solution for this type of approach.
Copy link to clipboard
Copied
BeRadB, From the sound of it, your proposal is as good as any. From a design point of view. It has the simplicity and context-awareness that an out of the box solution won't be able to match.
Copy link to clipboard
Copied
And, hey, who knows.. if it's good enough, you might even be able to market it as a customizable turnkey solution for anyone else looking to do the same.
V/r,
^ _ ^