I am trying to write a custom logger target by extending TraceTarget and overriding the mx_internal function internalLog. I would like to send the occasional error log to our server for recording. I am doing this using an HTTPService, and sending it each time internalLog() is called.
However, if one does the following,
logTarget = new StandardLogTarget();
logTarget.filters=["*"];
logTarget.level = LogEventLevel.ALL;
the log target picks up logs generated by the HTTPService object inside the StandardLogTarget object. This produces an infinite loop. Also, I'm not concerned with the logs generated by the custom logger.
Is there a way around this problem?