Package org.apache.logging.log4j.core.appender

Examples of org.apache.logging.log4j.core.appender.AppenderRuntimeException


                rpcClient.close();
                rpcClient = null;
                String msg = "Unable to write to " + getName() + " at " + agents[current].getHost() + ":" +
                    agents[current].getPort();
                LOGGER.warn(msg, ex);
                throw new AppenderRuntimeException("No Flume agents are available");
            }
        }
    }
View Full Code Here


                rpcClient.close();
                rpcClient = null;
                String msg = "Unable to write to " + getName() + " at " + agents[current].getHost() + ":" +
                    agents[current].getPort();
                LOGGER.warn(msg, ex);
                throw new AppenderRuntimeException("No Flume agents are available");
            }
        }
    }
View Full Code Here

            if (connector != null && !immediateFail) {
                connector.latch();
            }
            if (socket == null) {
                final String msg = "Error writing to " + getName() + " socket not available";
                throw new AppenderRuntimeException(msg);
            }
        }
        synchronized (this) {
            try {
                getOutputStream().write(bytes, offset, length);
            } catch (final IOException ex) {
                if (retry && connector == null) {
                    connector = new Reconnector(this);
                    connector.setDaemon(true);
                    connector.setPriority(Thread.MIN_PRIORITY);
                    connector.start();
                }
                final String msg = "Error writing to " + getName();
                throw new AppenderRuntimeException(msg, ex);
            }
        }
    }
View Full Code Here

        try {
            address = InetAddress.getByName(host);
        } catch (final UnknownHostException ex) {
            final String msg = "Could not find host " + host;
            LOGGER.error(msg, ex);
            throw new AppenderRuntimeException(msg, ex);
        }

        try {
            ds = new DatagramSocket();
        } catch (final SocketException ex) {
            final String msg = "Could not instantiate DatagramSocket to " + host;
            LOGGER.error(msg, ex);
            throw new AppenderRuntimeException(msg, ex);
        }
    }
View Full Code Here

        buffer.flip();
        try {
            randomAccessFile.write(buffer.array(), 0, buffer.limit());
        } catch (IOException ex) {
            String msg = "Error writing to RandomAccessFile " + getName();
            throw new AppenderRuntimeException(msg, ex);
        }
        buffer.clear();
    }
View Full Code Here

                rpcClient.close();
                rpcClient = null;
                String msg = "Unable to write to " + getName() + " at " + agents[current].getHost() + ":" +
                    agents[current].getPort();
                LOGGER.warn(msg, ex);
                throw new AppenderRuntimeException("No Flume agents are available");
            }
        }
    }
View Full Code Here

                rpcClient.close();
                rpcClient = null;
                String msg = "Unable to write to " + getName() + " at " + agents[current].getHost() + ":" +
                    agents[current].getPort();
                LOGGER.warn(msg, ex);
                throw new AppenderRuntimeException("No Flume agents are available");
            }
        }
    }
View Full Code Here

            if (connector != null && !immediateFail) {
                connector.latch();
            }
            if (socket == null) {
                final String msg = "Error writing to " + getName() + " socket not available";
                throw new AppenderRuntimeException(msg);
            }
        }
        synchronized (this) {
            try {
                getOutputStream().write(bytes, offset, length);
            } catch (final IOException ex) {
                if (retry && connector == null) {
                    connector = new Reconnector(this);
                    connector.setDaemon(true);
                    connector.setPriority(Thread.MIN_PRIORITY);
                    connector.start();
                }
                final String msg = "Error writing to " + getName();
                throw new AppenderRuntimeException(msg, ex);
            }
        }
    }
View Full Code Here

        try {
            address = InetAddress.getByName(host);
        } catch (final UnknownHostException ex) {
            final String msg = "Could not find host " + host;
            LOGGER.error(msg, ex);
            throw new AppenderRuntimeException(msg, ex);
        }

        try {
            ds = new DatagramSocket();
        } catch (final SocketException ex) {
            final String msg = "Could not instantiate DatagramSocket to " + host;
            LOGGER.error(msg, ex);
            throw new AppenderRuntimeException(msg, ex);
        }
    }
View Full Code Here

            if (!appender.isStarted()) {
                appender.getHandler().error("Attempted to append to non-started appender " + appender.getName());

                if (!appender.isExceptionSuppressed()) {
                    throw new AppenderRuntimeException(
                        "Attempted to append to non-started appender " + appender.getName());
                }
            }

            if (appender instanceof Filterable && ((Filterable) appender).isFiltered(event)) {
                return;
            }

            try {
                appender.append(event);
            } catch (final RuntimeException ex) {
                appender.getHandler().error("An exception occurred processing Appender " + appender.getName(), ex);
                if (!appender.isExceptionSuppressed()) {
                    throw ex;
                }
            } catch (final Exception ex) {
                appender.getHandler().error("An exception occurred processing Appender " + appender.getName(), ex);
                if (!appender.isExceptionSuppressed()) {
                    throw new AppenderRuntimeException(ex);
                }
            }
        } finally {
            recursive.set(null);
        }
View Full Code Here

TOP

Related Classes of org.apache.logging.log4j.core.appender.AppenderRuntimeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.