Sign in to follow this  
Rajkumar

How To Enable Logs

Recommended Posts

Is that due to weekend mood....It is not LOGO...It is logs....I want to see error stream while creating charts!!!

 

 

 

Hi Raj,

 

Please refer to the link mentioned below.

 

This link explains in details, the codes that is required to be change in XML code to allow the display of the external logos if FusionCharts.

 

Ref.- http://www.fusioncha...tDesc/Logo.html

 

I hope this helps.

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi Rajkumar,

 

I apologize for the inconvenience caused.

 

Could you please specify the issue a bit elaborately?

 

Awaiting your reply.

Share this post


Link to post
Share on other sites

Hi,

 

The debug mode is a new concept introduced in FusionCharts v3 that helps you look into what is happening behind the chart scenes. It also lists out any errors, if present. You can use the debug window to trouble shoot all your charts. The debug window lists errors like:

 

1. Error in loading data - reasons.

2. No data to display - possible reasons.

3. Invalid XML data - 10 possible reasons.

4. If invalid style names are specified for Chart OBJECTS, etc.

 

For further details on the DebugMode, please refer to the following link:

http://www.fusioncharts.com/docs/Debug/Window.html

 

Hope this helps. :)

Share this post


Link to post
Share on other sites

Hello.

 

I am also interested in this. Is there a way to get that debug mode output out from the flash into the server logs? Problem is that while the debug mode is useful for something, it is client side and you will never know what your client saw.

 

Is there a possibility to let the flash call javascript with all the debug info? If you could define some kind of callback for debugging then you could handle that in the servlet or jsp or what ever it is you use for server.

 

for example:

 

var myChart = new FusionCharts( { 
 swfUrl: 'FusionCharts/Column3D.swf',
 width: '400', 
 height: '300',
 debugMode : true
 debugCallback: '/log?debugMessage='
});

 

Now instead of the chart showing that panel over it, when it has a debug message it would send an ajax request to debugCallback with appended message like /log?debugMessage=Info: Chart loaded and initialized.

 

The example is a bit rough and would spam the logs with too much stuff, but it would be useful if it could be limited to errors etc, maybe use javascript function as the callback instead of straight up ajax request etc.

Share this post


Link to post
Share on other sites

Hi,

 

Is there a way to get that debug mode output out from the flash into the server logs?

I am afraid, this is not possible, as of now. :)

 

FusionCharts is a client-side based component. Hence it does not support any logs on the server-side.

Share this post


Link to post
Share on other sites

FusionCharts is a client-side based component. Hence it does not support any logs on the server-side.

 

What would really be useful is just a debug callback. I know there is already some internal error messages that show up in debug mode and I saw that in the javascript API there is some listeners that can be registered. Maybe consider adding this kind of event for debug messages so we could register our own javascript there.

 

Actually.. now that I look at the docs, I see that there might even already be those events: http://www.fusioncharts.com/docs/JavaScript/API/Events.html

 

If I understand correctly, all I would have to do is to implement a javascript listener that would take those events and make an ajax call to my server with a message and implement a server side module that would take the message and log it. I will have to take a look at that, should be pretty straight forward to implement. Are there any examples on listening events?

Share this post


Link to post
Share on other sites

Hi,

 

Please try referring to the example given in the FusionCharts Download pack.

 

Ref.: Download Pack >> Code >> JavaScript >> Basics >> ListeningToEvents

 

Hope this helps. :)

Share this post


Link to post
Share on other sites

Hi,

 

Please try referring to the example given in the FusionCharts Download pack.

 

Ref.: Download Pack >> Code >> JavaScript >> Basics >> ListeningToEvents

 

Hope this helps. :)

 

Will do. Thanks for the quick replies :)

Share this post


Link to post
Share on other sites

Turns out that even the javascript event examples are not working in my browser. I assume that it is some sort of safety feature in firefox/flash/something and if it is, enabling server side logging is impossible.

Share this post


Link to post
Share on other sites

Hi,

 

Flash Player Global Security settings needs to be enabled, if you are running the application from local file system (C:\ or D:\) and not from web server (local or live).

 

Flash Player's Global Security setting blocks invoking/calling JavaScript from SWF (Flash Movie) by default. So you need to reset your setting into Global Security Setting panel and enable it.

 

Please refer to the following page for further details on the Flash Player Global Security settings:

http://www.fusioncharts.com/Tools/FlashPlayerSecuritySetup/HowToSetup.html

 

Also, please make sure the "RegisterWithJS" parameter is enabled in the HTML code.

Ref.- var chart = new FusionCharts("MSLine.swf", "ChartId", "600", "350", "0", "1");

 

Hope this helps. :)

Share this post


Link to post
Share on other sites

Yeah I was trying to run the example from local file system, running it through apache and it worked ok. I guess there is hope for server side logging after all :) Thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this