[request] XML output of scores
#21
(08 Jan 11, 05:38PM)Luc@s Wrote: Fiz's solution : I would like to know more about it. Does it allow to get extended informations ? what happens if link between PHP server and AC server is broken ? datas are lost ?

Well there is no way for the link to be broken really. The server would be a sub/child process of PHP so its running inside PHP. So far its been working great and you get all the output that the server gives on the console including stdout and stderr as well as being able to use stdin for sending keystrokes to the server if some type of ability in the future is added to do anything inside the console.

Here is the class I am working on now maybe someone can improve it or whatever. Currently all it does is log the lines to a mysql database. I am still trying to figure out if the parsing of the logs should be done right then or by another script outside of this one for reasons of slowing it down.

PHP Class:
http://pastie.org/private/svcyjlkxtzvobqeaukds1g

Actual Execution:
http://pastie.org/private/xhwanrz1lehwntvzmiu42w

Disclaimer: PHP scripts are sold as is and no warranty is given, scripts may cause indigestion and/or bloating. :P Commenting on this is also very sparse so feel free to ask me about whats going on.

I think that to make this what is wanted the parsing of the output should probably be done in line in the same script so its all accomplished in the 1 script so its the only process that needs to be started/managed.

I think the focus of this thread has got blurred a little. So I ask was the focus to make logs easier to read or make them more parsible? I think my solution can accomplish both but it will be in a harder to access medium requiring an interface to view. If the focus is making things easier to manage in a ladder which is mostly in a web interface I don't see that as a problem but if the focus is to make the logs human readable locally I think that maybe the bulkier xml storage format would be better. Mainly because xml+xslt will make the xml file look like exactly what you want it to and things like real time search could be added with javascript. Of course the xml files would have to be open in a browser but since thats the default for most computers it wouldn't be a problem either.

Sorry that I am always so long winded but my mind goes crazy when it comes to figuring programming stuff out :P


Thanks given by:


Messages In This Thread
[request] XML output of scores - by Luc@s - 05 Jan 11, 02:23PM
RE: [request] XML output of scores - by Drakas - 05 Jan 11, 03:17PM
RE: [request] XML output of scores - by Luc@s - 05 Jan 11, 05:19PM
RE: [request] XML output of scores - by Fiz - 07 Jan 11, 11:06PM
RE: [request] XML output of scores - by Fiz - 08 Jan 11, 12:59AM
RE: [request] XML output of scores - by Alien - 08 Jan 11, 02:11PM
RE: [request] XML output of scores - by Luc@s - 08 Jan 11, 03:15PM
RE: [request] XML output of scores - by Alien - 08 Jan 11, 05:22PM
RE: [request] XML output of scores - by Luc@s - 08 Jan 11, 05:38PM
RE: [request] XML output of scores - by Fiz - 08 Jan 11, 06:30PM
RE: [request] XML output of scores - by Luc@s - 08 Jan 11, 07:11PM
RE: [request] XML output of scores - by Fiz - 08 Jan 11, 07:42PM
RE: [request] XML output of scores - by Luc@s - 08 Jan 11, 06:06PM
RE: [request] XML output of scores - by Alien - 08 Jan 11, 06:26PM
RE: [request] XML output of scores - by Alien - 08 Jan 11, 06:33PM
RE: [request] XML output of scores - by Drakas - 08 Jan 11, 08:06PM
RE: [request] XML output of scores - by Fiz - 08 Jan 11, 08:09PM
RE: [request] XML output of scores - by Drakas - 08 Jan 11, 08:35PM
RE: [request] XML output of scores - by Fiz - 08 Jan 11, 09:05PM
RE: [request] XML output of scores - by Drakas - 08 Jan 11, 09:27PM
RE: [request] XML output of scores - by Luc@s - 08 Jan 11, 09:23PM
RE: [request] XML output of scores - by Fiz - 08 Jan 11, 09:57PM
RE: [request] XML output of scores - by Drakas - 08 Jan 11, 10:17PM
RE: [request] XML output of scores - by Fiz - 08 Jan 11, 10:55PM
RE: [request] XML output of scores - by Fiz - 08 Jan 11, 11:43PM
RE: [request] XML output of scores - by Luc@s - 09 Jan 11, 01:01PM