"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "log4j-core/src/main/java/org/apache/logging/log4j/core/appender/nosql/NoSqlDatabaseManager.java" between
apache-log4j-2.11.1-src.tar.gz and apache-log4j-2.11.2-src.tar.gz

About: Apache Log4j 2 is a logging library for Java. Source distribution (Java).

NoSqlDatabaseManager.java  (apache-log4j-2.11.1-src):NoSqlDatabaseManager.java  (apache-log4j-2.11.2-src)
skipping to change at line 21 skipping to change at line 21
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the license for the specific language governing permissions and * See the license for the specific language governing permissions and
* limitations under the license. * limitations under the license.
*/ */
package org.apache.logging.log4j.core.appender.nosql; package org.apache.logging.log4j.core.appender.nosql;
import java.io.Serializable; import java.io.Serializable;
import javax.jms.JMSException;
import org.apache.logging.log4j.Marker; import org.apache.logging.log4j.Marker;
import org.apache.logging.log4j.ThreadContext; import org.apache.logging.log4j.ThreadContext;
import org.apache.logging.log4j.core.LogEvent; import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.appender.AppenderLoggingException; import org.apache.logging.log4j.core.appender.AppenderLoggingException;
import org.apache.logging.log4j.core.appender.ManagerFactory; import org.apache.logging.log4j.core.appender.ManagerFactory;
import org.apache.logging.log4j.core.appender.db.AbstractDatabaseManager; import org.apache.logging.log4j.core.appender.db.AbstractDatabaseManager;
import org.apache.logging.log4j.core.util.Closer; import org.apache.logging.log4j.core.util.Closer;
import org.apache.logging.log4j.message.MapMessage; import org.apache.logging.log4j.message.MapMessage;
import org.apache.logging.log4j.util.BiConsumer; import org.apache.logging.log4j.util.BiConsumer;
import org.apache.logging.log4j.util.ReadOnlyStringMap; import org.apache.logging.log4j.util.ReadOnlyStringMap;
skipping to change at line 72 skipping to change at line 70
@Override @Override
protected void connectAndStart() { protected void connectAndStart() {
try { try {
this.connection = this.provider.getConnection(); this.connection = this.provider.getConnection();
} catch (final Exception e) { } catch (final Exception e) {
throw new AppenderLoggingException("Failed to get connection from No SQL connection provider.", e); throw new AppenderLoggingException("Failed to get connection from No SQL connection provider.", e);
} }
} }
@Deprecated
@Override
protected void writeInternal(final LogEvent event) {
writeInternal(event, null);
}
@Override @Override
protected void writeInternal(final LogEvent event, final Serializable serial izable) { protected void writeInternal(final LogEvent event, final Serializable serial izable) {
if (!this.isRunning() || this.connection == null || this.connection.isCl osed()) { if (!this.isRunning() || this.connection == null || this.connection.isCl osed()) {
throw new AppenderLoggingException( throw new AppenderLoggingException(
"Cannot write logging event; NoSQL manager not connected to the database."); "Cannot write logging event; NoSQL manager not connected to the database.");
} }
final NoSqlObject<W> entity = this.connection.createObject(); final NoSqlObject<W> entity = this.connection.createObject();
if (serializable instanceof MapMessage) { if (serializable instanceof MapMessage) {
setFields((MapMessage<?, ?>) serializable, entity); setFields((MapMessage<?, ?>) serializable, entity);
 End of changes. 2 change blocks. 
8 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)