/** * Adds a log target to this facility. Log targets get informed, via the * LogTarget interface, whenever a message is logged with this class. * * @param target the target. */ public synchronized void addTarget(final LogTarget target) { super.addTarget(target); // as soon as there is a real log target added, we do no longer need // the default logging. This was only installed to be able to send messages // if the deepest basic logging failed. if (target != DEFAULT_LOG_TARGET) { removeTarget(DEFAULT_LOG_TARGET); } }
/** * Adds a log target to this facility. Log targets get informed, via the * LogTarget interface, whenever a message is logged with this class. * * @param target the target. */ public synchronized void addTarget(final LogTarget target) { super.addTarget(target); // as soon as there is a real log target added, we do no longer need // the default logging. This was only installed to be able to send messages // if the deepest basic logging failed. if (target != DEFAULT_LOG_TARGET) { removeTarget(DEFAULT_LOG_TARGET); } }
/** * Adds a log target to this facility. Log targets get informed, via the * LogTarget interface, whenever a message is logged with this class. * * @param target the target. */ public synchronized void addTarget(final LogTarget target) { super.addTarget(target); // as soon as there is a real log target added, we do no longer need // the default logging. This was only installed to be able to send messages // if the deepest basic logging failed. if (target != DEFAULT_LOG_TARGET) { removeTarget(DEFAULT_LOG_TARGET); } }
Log.getInstance().addTarget(new PrintStreamLogTarget());
Log.getInstance().addTarget(new PrintStreamLogTarget());
Log.getInstance().addTarget(new PrintStreamLogTarget());
Log.getInstance().addTarget(new PrintStreamLogTarget());