Package org.apache.commons.logging

Examples of org.apache.commons.logging.Log.error()


    CommandLine commandLine = null;
    try {
      commandLine = new PosixParser().parse(options, args);
    } catch (ParseException e) {
      LOG.error("Could not parse: ", e);
      printUsageAndExit(options, -1);
    }

    // check for user-defined port setting, if so override the conf
    if (commandLine != null && commandLine.hasOption("port")) {
View Full Code Here


        try {
            value = PropertyUtils.getProperty(bean, property);

        } catch(IllegalAccessException e) {
            Log log = LogFactory.getLog(ValidatorUtils.class);
            log.error(e.getMessage(), e);
        } catch(InvocationTargetException e) {
            Log log = LogFactory.getLog(ValidatorUtils.class);
            log.error(e.getMessage(), e);
        } catch(NoSuchMethodException e) {
            Log log = LogFactory.getLog(ValidatorUtils.class);
View Full Code Here

        } catch(IllegalAccessException e) {
            Log log = LogFactory.getLog(ValidatorUtils.class);
            log.error(e.getMessage(), e);
        } catch(InvocationTargetException e) {
            Log log = LogFactory.getLog(ValidatorUtils.class);
            log.error(e.getMessage(), e);
        } catch(NoSuchMethodException e) {
            Log log = LogFactory.getLog(ValidatorUtils.class);
            log.error(e.getMessage(), e);
        }
View Full Code Here

        } catch(InvocationTargetException e) {
            Log log = LogFactory.getLog(ValidatorUtils.class);
            log.error(e.getMessage(), e);
        } catch(NoSuchMethodException e) {
            Log log = LogFactory.getLog(ValidatorUtils.class);
            log.error(e.getMessage(), e);
        }

        if (value == null) {
            return null;
        }
View Full Code Here

    CommandLine commandLine = null;
    try {
      commandLine = new PosixParser().parse(options, args);
    } catch (ParseException e) {
      LOG.error("Could not parse: ", e);
      printUsageAndExit(options, -1);
    }

    // check for user-defined port setting, if so override the conf
    if (commandLine != null && commandLine.hasOption("port")) {
View Full Code Here

    CommandLine commandLine = null;
    try {
      commandLine = new PosixParser().parse(options, args);
    } catch (ParseException e) {
      LOG.error("Could not parse: ", e);
      printUsageAndExit(options, -1);
    }

    // check for user-defined port setting, if so override the conf
    if (commandLine != null && commandLine.hasOption("port")) {
View Full Code Here

        Resource r = new ClasspathResource(getClassResolver(), "/foo/bar/Baz.module");
        Location l = new LocationImpl(r, 13);

        Throwable ex = new IllegalArgumentException();

        log.error("Error at classpath:/foo/bar/Baz.module, line 13: Bad frob value.", ex);

        replayControls();

        ErrorHandler eh = new DefaultErrorHandler();
View Full Code Here

    {
        Log log = (Log) newMock(Log.class);

        Throwable ex = new IllegalArgumentException();

        log.error("Error: Bad frob value.", ex);

        replayControls();

        ErrorHandler eh = new DefaultErrorHandler();
View Full Code Here

    @Test
    public void instance_method_bind_is_ignored()
    {
        Log log = mockLog();

        log.error(and(
                contains(NonStaticBindMethodModule.class.getName()),
                contains("but is an instance method")));

        replay();
View Full Code Here

        Page page = mockPage();
        Log log = mockLog();

        train_detached(page, true);

        log.error(EasyMock.contains("is dirty, and will be discarded"));

        // The fact that we don't ask
        // the page for its name is our clue that it is not being cached.

        replay();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.