//If the logging function is disable, do nothing.
if(enabled) {
if(writers.size() > 0) {
//Fetch each writer in the configuration object and notify the writer to output the message
for(Iterator<Writer> it = writers.iterator();it.hasNext();) {
Writer writer = it.next();
try {
writer.write(message, type, depth+1);
} catch(Exception e) {
//If the the writer raise an error when process the message, remove the writer from the configuration object to avoid the error happen again.
e.printStackTrace();
writers.remove(writer);
}