Options for logging Windows Store apps - javascript

So I'm creating many Windows (8) Store apps and I'm wondering what are my best choices to help my users but possible bugs (if they ever occour).
I was thinking about a log4net like solution to a rollingFile. Or maybe on the appcrashed event send a crash report to my own server.
What are my options? what's the "best" option?

I'd recommend using the new Google Analytics service. Just add the free Google Analytics SDK for Windows 8 to your app and automatically track unhandled exceptions (or add 1 line of code to track them manually). Super easy, plus you get a ton of great analytics tracking for your app.

You could use log4javascript and use the RollingFileAppender from here: http://pastebin.com/MdCtjGt8 It uses the momentjs lib to calculate the file name but you can substitute this with your own calculation.

Related

NodeJS + Tampermonkey can they work together?

I am creating software that helps me and my colleagues to work on tickets at work, as our current software is really bad. At this moment I am using program that I wrote in Tampermonkey, it is giving information about queue and all other fancy stuff. But I reached limit of that, as website is a limitation, so I started to create website that could do much more, yet I am not sure how to connect it as when I am using Tampermonkey to create overlay with all needed data. My idea was to: 1) Gather all data by tampermonkey and send it to nodejs server. Node would keep array (that's all I need) locally and then I would be able to access it.
Is this possible, is this a correct approach? Unfortunately I am limited by options that I can use by company security policy.

What is the easiest way to store a variable in node.js?

I am migrating my script from Google Chrome Extension to node.js
And I simply need to store a couple of variables, nothing fancy and performance isn't an issue either, since they would only be accessed when the script is restarted.
In Google Chrome Extension I would use the client side HTML5 storage (localStorage)
However as a server language node.js doesn't have this feature and it's not surprising.
I could of course install some database and being particularly familiar with MySQL this is not an issue, but, if there is a simple way of storing my configs - I would much like to try it out.
If u get experience with localStorage you can use node-localstorage.
I'd recommend using sw-precache, aka service workers. They run in the browser and can be used by the fetch api. Here's a great node_module that will accomplish your needs.
https://github.com/GoogleChrome/sw-precache
Here is a codelab that explains service workers in more detail:
https://codelabs.developers.google.com/codelabs/sw-precache/index.html

Sharing google chrome extension information across users

My problem is simple : I would like to do some statistics on a website my friends and I visit.
So I would like to find a way to connect each instance of my info-gathering google chrome extension in order to gather them in a common place for analysis.
As a first thougt, one ideal solution would be to get read-write access to a shared google drive spreadsheet, but I am open to other solutions.
Is it feasible ? Can anyone point me to the good direction ?
Thanks a lot
A spreadsheet is easy and works well for few users and rows, however the easiest way is to use google analytics, extensions support them and there are samples for custom events.
If you go the spreadsheet route use appendrow to avoid concurrency issues.
You would need to use oauth for spreadsheet access or set sharing to public write.
For a more sophisticated solution with total control of the data and scalability use Google bigquery.

How can web and error events be logged to Splunk using node.js?

I've found plenty of documentation on how to perform Splunk searches from within Node.js (thanks in chief to the Splunk javascript SDK documentation).
However, that's not what I'm trying to accomplish. I am hoping to use Splunk as my logging/monitoring/analytics solution for a site which is driven by node.js. I need to be able to log different types of events (login errors, page requests/responses, etc) for Splunk to index and make usable.
How can this be accomplished? Is it part of the SDK (or the API itself) that I'm just overlooking?
Thanks for any insight.
At our recent Splunk Conference we held a Hackathon and one of the winners actually developed a Splunk transport for Winston. You can grab it from github.
Take a look at Winston. This is a framework similar to Log4Net or Log4J which provides variable log levels and transport options.
They do not appear to have a "transport" / plug-in for Splunk, but they have several others including the relatively similar Loggly. They also have instructions on rolling your own, so it looks like a good place to start.

Non-invasive javascript performance agent?

I am seeking to (legitimately) plant bugging in my web pages to collect and report information about website performance.
Preference for internally hosted. While I expect that there are commercial offerings out there (e.g. Google Analytics) I'm keen to find something we can run entirely in-house (its not a public website and may contain sensitive data).
Also, I'm looking for something where it can report back to an independent URL - i.e. not relying on adding in a reverse-proxy / recording results within existing webserver logs. Indeed, I'd prefer something which does not require access to the webserver logs logs at all (other than those for the URL the bug reports back to).
I need to be able to monitor bulk traffic - so things tools like pagespeed and tamperdata are not appropriate.
I've tried googling but just seem to be getting lots of noise about the performance of javascript and web pages rather than how to actually measure these.
TIA
You could use the open source analytics software Piwik and write a plugin for it that sends the performance data to it.
Thanks chiborg. I'd kind of forgotten about this it was so long ago I asked. Yes, I was aware of PiWik - but not been very impressed with either its implementation nor the quality of documentation.
I'm currently working on a solution using Boomerang.

Categories