-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sequence number #6
Comments
Hi Matt, I was playing around with version 2.7.6.0 of JSNLog (I believe that this is the latest available version) and I ran into an issue whereby it appears that individual log messages sent to the server appeared to be out of sequence compared to the console. Has this been fixed in a later version or is there |
Oops ! my keyboard just barfed on me. |
Hi Michael, 2.7.6 is indeed the latest version. As far as I know, there is no easy workaround. If this is a big problem for you, you could of course create your own sequence number in your JavaScript and log that with the rest of the log message. However, I can see that this is not a satisfactory solution - this sort of thing should be in the logging package itself. Your comment meanwhile may prompt me to add a sequence number to the next release. I'm pretty busy at the moment though, so can't promise a timeline. Alternatively, you could implement sequence numbers in jsnlog.js and send me a pull request :-) Thanks, Matt |
Hi again Matt, |
Hi Michael, You can distinguish between individual clients with request ids: Matt |
Hi Matt, [BEGIN LOGGING AT 2014-12-03 15:23:24,922] [BEGIN LOGGING AT 2014-12-03 15:23:24,922] [BEGIN LOGGING AT 2014-12-03 15:23:24,940] [BEGIN LOGGING AT 2014-12-03 15:23:24,940] [BEGIN LOGGING AT 2014-12-03 15:23:24,940] [BEGIN LOGGING AT 2014-12-03 15:23:24,943] compared to the previously working log without the request ids [BEGIN LOGGING AT 2014-12-03 16:32:51,097] Any ideas why it would be doing this ? Regards - Michael |
Hi again Matt, |
Hi Michael, I've never seen the problems you reported with Log4Net and request ids. Just to make sure, I created a simple demo project that logs via Log4Net and that also uses request ids. It worked fine. I've added it to the jsnlogSimpleWorkingDemos project on Github (look for project "EmptyLog4Net - RequestIds"): In case you keep having problems, could you create a small demo site that reproduces the problem you're seeing and put it on Github. No guarantee I'll be able to solve it, but you never know. The smaller and focused you can make that demo the better. About getting client IPs: Regards, Matt |
I implemented a sequence number in version 2.25.0. This is unique per request and is always higher for messages that were generated later. On http://jsnlog.com/Documentation/Configuration/JSNLog look for %entryId |
When two items get logged right after each other, their JavaScript timestamps may be the same. But there is no guarantee that they arrive at the server in the right order. If this happens when logging parameters on a series of function calls, that can get very confusing.
Have a central sequence number (shared by all appenders) that assigns a seq nbr to all log items in increasing order. That way, each log item has a sequence number that is unique per request.
The text was updated successfully, but these errors were encountered: