we’re developing an application and we need for this and further projects a centralized logging. I know there is a build in log api in flex builder 4.5. And the loger has a log target. All i found is how to send these loginformations to the trace console.
But i’m looking for sending the logfiles to my server.
Maybe i can send messages to a webservice which fill a database in the backend. I dont’know if this is a recommanded way.
How do you store your log informations centralized?
Thanks in advance
Frank
There isn’t an out of the box way to do this as far as I know.
I have a log class that has a connection to the server through a remote object. This could also be a web service.
I use a singleton pattern for that log class.
I use it to log errors in an AIR app. I have a global error handler to catch unhandled exceptions. I then call a log class that just calls a remote object and records the error to a log table.
The log class is flexible enough to handle debug and info statements. I pretty much copy the log4net way to log errors which allows me to specify a type (debug, error, info, ect) and a message. You could overload the method so you can send it more information (like message, elapsed time, userID, class, ect).
Here’s a function that we use to log errors: