Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
Just to preface, I am new to Log4Fx. I am working on doing a POC using Log4Fx to see if it is a tool that our team will want to use. I have been able to get it working just fine locally but I am having problems in getting the remote logging working. I have a test Flex app that i have released to a server. From one computer I access the main application and bring up the logging manager and select remote logging and give a password. From a different computer I access the RemoteLogReceiver.html. I enter the password that I created and then I get the following error message.
[MessagingError message='Destination 'RemoteLogging' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']
Not sure what else I need to set up in order to get this working. This is a key feature that we would like to take advantage of.
Just for information I am using the latest Log4Fx version, Flex Builder 3.0.2, and Eclipse 3.4.2.
Any help would be greatly appreciated.
This destination is in messaging-config.xml upon configuring project for Log4Fx.
However, as usual, global variable ServerConfig.xml gets assigned the footprint of xyz-config.xml files upon Clean.
As an advice, add -keep to the compiler settings and check the <app or remotelogviewer>_FlexInit.as.
In the bottom part of this generated file you will see the channels and destinations that ARE available to the SWF.
I am trying to achieve the same through actionscript. When i compile the application, i do not pass the services-config.xml path as a compiler arg. I load this file in the application when it is initialized and i set the end points for all remote call. Below is how i initialise the remote logging
loggingTarget.logOutput = new RemoteOutput('RemoteLogging');
(loggingTarget.logOutput as RemoteOutput).subtopic = 'pass';
I face the the same error mentioned above. What i would like to know is can we set the end point URL as we do for the flex HttpService class for the RemoteOutput class?
Most likely RemoteLogging application and your application are in one project. Which means that both of them do not see the messaging channel/destination. My suggestion: fight one application at a time. In particular, let RemoteLogging application compile WITH services-config.xml by providing additional RemoteLogging-config.xml file that specifies extra compiler arguments for this app.
Thanks Victor for the quick reply. As you said, both the RemoteLogging application and the RemoteLogReciever are in the same application. We have a restriction in our application of not using the services-config.xml as a compiler argument because of build automation issues. Hence we set the end point url's through the code.
Is there a way of passing the end point url through the code for the RemoteLogging class (sorry for repeating the same question again)
Your response is greatly appreciated.
You are welcome. You can set ChannelSet for a Producer or Consumer exactly the same programmatical way you did for a RemoteObject.
That said, having seen many continous integration builds, I can't figure how service-config got in the way of the build. If anything, use Application's preinitialize event to achieve the ultimate flexibility of dynamically modifying ServerConfig.xml after services-config.xml data has been injected into SWF, but keep work of build engineers and developers totally independent.