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

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


        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 (!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 (RuntimeException ex) {
                appender.getHandler().error("An exception occurred processing Appender " + appender.getName(), ex);
                if (!appender.isExceptionSuppressed()) {
                    throw ex;
                }
            } catch (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

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

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

                connector.setDaemon(true);
                connector.setPriority(Thread.MIN_PRIORITY);
                connector.start();
            }
            String msg = "Error writing to " + getName();
            throw new AppenderRuntimeException(msg, ex);
        }
    }
View Full Code Here

                    sleep(delay);
                }
            } while (++i < retries);
        }

        throw new AppenderRuntimeException(msg);

    }
View Full Code Here

                current = i;
                return server;
            }
            ++i;
        }
        throw new AppenderRuntimeException("Unable to connect to any agents");
    }
View Full Code Here

            if (appender instanceof Lifecycle && !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 Filtering && ((Filtering) appender).isFiltered(event)) {
                return;
            }

            try {
                appender.append(event);
            } catch (RuntimeException ex) {
                appender.getHandler().error("An exception occurred processing Appender " + appender.getName(), ex);
                if (!appender.isExceptionSuppressed()) {
                    throw ex;
                }
            } catch (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

                connector.setDaemon(true);
                connector.setPriority(Thread.MIN_PRIORITY);
                connector.start();
            }
            String msg = "Error writing to " + getName();
            throw new AppenderRuntimeException(msg, ex);
        }
    }
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.