Comments (18)
anyone?
from bugloghq.
@KrunchMuffin checkpoints should work "out of the box". Can you try going to the listener test page and trigger a message? The test message will include a checkpoint that should be visible on the report.
( settings -> BugLog Listeners -> Test )
from bugloghq.
I got the exact same blank checkpoint table
from bugloghq.
Would really like to find out what is going on?
from bugloghq.
that is very strange. You could try setting other things on the request
scope and then do cfdump
s in several places to see where it is being wiped out.
Could it be that the buglog client is being reinitialized?
from bugloghq.
I set it once in app scope, I don't think it would be getting reset.
I set up a test page with just this code
<cfset application.buglog.checkpoint("test checkpoint")>
<cfdump var="#request#">
<cftry>
<cfset foo = x>
<cfcatch>
<cfset application.buglog.notifyService("Test BL", cfcatch, request)>
</cfcatch>
</cftry>
__buglog_checkpoints__
was empty array
and checkpoints was blank
from bugloghq.
what if you dump requests. __buglog_checkpoints__
on each call to checkpoint
and then call it multiple times?
from bugloghq.
so this
<cfset application.buglog.checkpoint("test checkpoint")>
<cfdump var="#request.__buglog_checkpoints__#">
<cfset application.buglog.checkpoint("test checkpoint2")>
<cfdump var="#request.__buglog_checkpoints__#">
<cfset request["__buglog_checkpoints__"] = []>
<cfset request["__buglog_checkpoints__"][1] = {ts=gettickcount(),cp="foo"}>
<cfset application.buglog.checkpoint("test checkpoint3")>
<cfdump var="#request.__buglog_checkpoints__#">
yields this
from bugloghq.
I am correct in assuming that this code is NOT putting checkpoints back into the request scope?
<cffunction name="checkpoint" access="public" returntype="void" hint="marks a checkpoint in the current request">
<cfargument name="checkpoint" type="string" required="true">
<cfscript>
var checkpoints = getCheckpoints();
var item = {
ts = getTickCount(),
cp = arguments.checkpoint
};
arrayAppend(checkpoints, item);
</cfscript>
</cffunction>
as soon as I add this after </cfscript>
, it works.
<cfset request[checkpointsKey] = checkpoints>
from bugloghq.
Well, it is supposed to be operating on a reference to the array on the request scope, and so far since this code was released, it always worked as expected.
It looks like something is making it pass the variable by value instead of by reference on the call to getCheckpoints()
from bugloghq.
I am on CF11. I am sure someone must be using checkpoints on CF11 as well?
from bugloghq.
Was justing reading up and from what I can tell Arrays are always passed by value.
Arrays are complex data types, but for historical reasons (and - IMO - a bad decision on the part of Macromedia's CF team) arrays are actually passed by value in ColdFusion.
http://blog.adamcameron.me/2012/08/complex-data-types-in-cf-and-how-theyre.html
http://www.bennadel.com/blog/275-passing-arrays-by-reference-in-coldfusion---sweeet.htm
But doesn't explain how it can be working for others?
from bugloghq.
hmm, I do most of my dev on Railo so that may be a difference.
from bugloghq.
ahhh, yes, Railo did fix that...
from bugloghq.
in any case it should be an easy fix. I can do an update to the checkpoints, or if you send me a PR that might be faster :)
from bugloghq.
ok, PR sent #138
from bugloghq.
Merged into release 1.8.8
https://github.com/oarevalo/BugLogHQ/releases/tag/v.1.8.8
from bugloghq.
Thanks!
from bugloghq.
Related Issues (20)
- Allow turning off the login process (or login using HTTP basic auth)
- The USER argument passed to the isAllowed function is not of type user.
- Mura plugin moved HOT 2
- Mobile link not working HOT 11
- We client showing wrong version number(?) HOT 3
- The ENTRYBEAN argument passed to the logEntry function is not of type rawEntryBean HOT 12
- Creating a new Rule HOT 5
- Alerts not getting removed HOT 12
- Slack alert, no data sometimes? HOT 4
- No matching Method/Function for Number.logEntry HOT 26
- Exception Detail & ExtendedInfo HOT 2
- A request was made to a resource that could not be located HOT 4
- Getting more done in GitHub with ZenHub
- Retina-friendly icon?
- ExtraInfo and JSON with null HOT 9
- Issues Using RegEx Inside SendToJira.cfm file
- Dead? HOT 8
- stuck in queue? HOT 2
- Delete of "all reports with same message" doesn't appear to work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bugloghq.