package tap.log; /* * This file is part of TAPLibrary. * * TAPLibrary is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * TAPLibrary is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with TAPLibrary. If not, see . * * Copyright 2012-2015 - UDS/Centre de DonnĂ©es astronomiques de Strasbourg (CDS), * Astronomisches Rechen Institut (ARI) */ import tap.TAPExecutionReport; import tap.TAPSyncJob; import tap.db.DBConnection; import tap.parameters.TAPParameters; import uws.service.log.UWSLog; /** * Let log any kind of message about a TAP service. * * @author Grégory Mantelet (CDS;ARI) * @version 2.0 (04/2015) */ public interface TAPLog extends UWSLog { /** *

Log a message and/or an error in the DB (database) context.

* *

List of all events sent by the library (case sensitive):

* * * @param level Level of the log (info, warning, error, ...). SHOULD NOT be NULL, but if NULL anyway, the level SHOULD be considered as INFO * @param connection DB connection from which this log comes. MAY be NULL * @param event Event at the origin of this log or action executed by the given database connection while this log is sent. MAY be NULL * @param message Message to log. MAY be NULL * @param error Error/Exception to log. MAY be NULL * * @since 2.0 */ public void logDB(final LogLevel level, final DBConnection connection, final String event, final String message, final Throwable error); /** *

Log a message and/or an error in the general context of TAP.

* *

* One of the parameter is of type {@link Object}. This object can be used to provide more information to the log function * in order to describe as much as possible the state and/or result event. *

* *

List of all events sent by the library (case sensitive):

* * * @param level Level of the log (info, warning, error, ...). SHOULD NOT be NULL, but if NULL anyway, the level SHOULD be considered as INFO * @param obj Object providing more information about the event/object at the origin of this log. MAY be NULL * @param event Event at the origin of this log or action currently executed by TAP while this log is sent. MAY be NULL * @param message Message to log. MAY be NULL * @param error Error/Exception to log. MAY be NULL * * @since 2.0 */ public void logTAP(final LogLevel level, final Object obj, final String event, final String message, final Throwable error); }