Example usage for java.util.logging Level INFO

List of usage examples for java.util.logging Level INFO

Introduction

In this page you can find the example usage for java.util.logging Level INFO.

Prototype

Level INFO

To view the source code for java.util.logging Level INFO.

Click Source Link

Document

INFO is a message level for informational messages.

Usage

From source file:main.MainClass.java

/**
 *
 * @param args The args is an String array parameter which must be used to
 * give two inputs to the method. They are mode and the maild. They must be
 * specified in the specified format like: mode=<paramvalue>
 * mailId=<paramvalue>/* w  w  w. j a  v a 2s. co  m*/
 *
 * for mode paramvalue there are two values: internal and external. mailId
 * paramvalue should be given to specify to which mail ID the mail generated
 * by this application must be sent to.
 *
 */
public static void main(String[] args) {
    // TODO code application logic here
    loggerObj.log(Level.INFO, "Inside main");
    MainClass objForParsingArgs = new MainClass();
    String commandLineArgs[] = objForParsingArgs.parseCommandLineArgs(args);

    String mode = commandLineArgs[0];
    String mailId = commandLineArgs[1];
    loggerObj.log(Level.INFO, "Picked up values: mode=" + mode + " mail=" + mailId);

    objForParsingArgs.deferenceObjects(new Object[] { objForParsingArgs, commandLineArgs, args });

    //Don't Delete : Used to generate open and closed summary issues in MEMDM Support portal
    //MainClass MDMIssMgrMailSender = new MainClass();
    //MDMIssMgrMailSender.IssueMgrStatusSummGen(mode, mailId);
    //Don't Delete : MEDC Support WOE Ticket generator
    //MainClass MEDCSupportMailSender = new MainClass();
    //MEDCSupportMailSender.MEDCSup_WOE_SummGen(mode, mailId);
    //Don't Delete :Issue manager sync from support tickets api:
    //MainClass issueMgrSupport = new MainClass();
    //issueMgrSupport.SupportToReportsSyncer(mode);
    //Don't Delete : AutoMail forwarder:

    //MainClass AutoMailForward = new MainClass();
    //AutoMailForward.autoMailForward(mode, mailId);
}

From source file:com.screenslicer.common.Log.java

public static void init(String loggerName, boolean allowFileLogging) {
    logger = Logger.getLogger(loggerName);
    if (allowFileLogging) {
        FileHandler fh = null;//from w w  w  .j a v a  2  s .  c om
        try {
            fh = new FileHandler("../" + loggerName + ".log", 250000, 9, true);
            logger.addHandler(fh);
            String logLevel = System.getProperty("screenslicer-logging", "prod");
            if (logLevel.equals("prod")) {
                logger.setLevel(Level.INFO);
            } else if (logLevel.equals("debug")) {
                logger.setLevel(Level.ALL);
            }
            SimpleFormatter formatter = new SimpleFormatter();
            fh.setFormatter(formatter);
        } catch (Throwable t) {
            t.printStackTrace();
            throw new RuntimeException(t);
        }
    }
}

From source file:io.fabric8.cxf.endpoint.JsonSchemaLookup.java

public void init() {
    LOG.log(Level.INFO, "Creating JsonSchemaLookup instance");
    try {/*  w w  w  . ja  v  a 2 s .  c o  m*/
        if (mapper == null) {
            mapper = new ObjectMapper();

            mapper.setVisibility(new IgnorePropertiesBackedByTransientFields(mapper.getVisibilityChecker()));

            JaxbAnnotationModule module1 = new JaxbAnnotationModule();
            mapper.registerModule(module1);

            BeanValidationAnnotationModule module2 = new BeanValidationAnnotationModule();
            mapper.registerModule(module2);

        }
        // now lets expose the mbean...
        singleton = this;
    } catch (Exception e) {
        LOG.log(Level.WARNING, "Exception during initialization: ", e);
        throw new RuntimeException(e);
    }
}

From source file:com.microsoft.windowsazure.core.tracing.util.JavaTracingInterceptor.java

/**
 * Trace information.
 * 
 * @param message
 *            The information to trace.
 */
public void information(String message) {
    logger.log(Level.INFO, message);
}

From source file:hr.foi.sis.controllers.TestDataController.java

@RequestMapping(value = "/", method = RequestMethod.GET)
@PreAuthorize("hasRole('ROLE_ADMIN')")
public ResponseEntity<List<TestData>> retrieveAll() {

    Logger.getLogger("TestDataController.java").log(Level.INFO,
            "GET on /testData -- retrieving full list of testData");

    return new ResponseEntity(this.testDataRepository.findAll(), HttpStatus.OK);

}

From source file:br.com.sicoob.cro.cop.batch.configuration.ItemReaderInjector.java

public void inject() throws Exception {
    Field[] fields = BatchUtil.getDeclaredFields(this.step.getReader());
    for (Field field : fields) {
        if (Validation.isFieldAnnotatedWith(field, Context.class)) {
            LOG.log(Level.INFO,
                    BatchPropertiesUtil.getInstance().getMessage(BatchKeys.BATCH_INJECTOR_INFO.getKey(),
                            new String[] { BatchKeys.CONTEXT.getKey(), field.getName() }));
            field.setAccessible(Boolean.TRUE);
            field.set(this.step.getReader(), createContext());
        }/*ww  w.j  av a 2  s.c o m*/
    }
}

From source file:br.com.sicoob.cro.cop.batch.configuration.ItemWriterInjector.java

public void inject() throws Exception {
    Field[] fields = BatchUtil.getDeclaredFields(this.step.getWriter());
    for (Field field : fields) {
        if (Validation.isFieldAnnotatedWith(field, Context.class)) {
            LOG.log(Level.INFO,
                    BatchPropertiesUtil.getInstance().getMessage(BatchKeys.BATCH_INJECTOR_INFO.getKey(),
                            new String[] { BatchKeys.CONTEXT.getKey(), field.getName() }));
            field.setAccessible(Boolean.TRUE);
            field.set(this.step.getWriter(), createContext());
        }/*from   w  ww .j  av a  2  s  .  c  om*/
    }
}

From source file:edu.usu.sdl.core.init.ApplyOnceInit.java

public void applyChanges() {
    log.log(Level.INFO, MessageFormat.format("Checking {0} to make sure it''s applied.", appliedKey));

    String lastRunString = service.getSystemService().getPropertyValue(appliedKey + "_LASTRUN_DTS");
    if (StringUtils.isNotBlank(lastRunString)) {
        log.log(Level.INFO, MessageFormat.format("Already Applied {0} on {1}", appliedKey, lastRunString));
    } else {/*from ww w .j  a  v a2  s  .  c o m*/
        String results = internalApply();
        log.log(Level.INFO, MessageFormat.format("Applied {0} changes", appliedKey));
        service.getSystemService().saveProperty(appliedKey + "_LASTRUN_DTS",
                TimeUtil.dateToString(TimeUtil.currentDate()));
        service.getSystemService().saveProperty(appliedKey + "_STATUS", results);
    }
}

From source file:br.com.sicoob.cro.cop.batch.configuration.ItemProcessorInjector.java

public void inject() throws Exception {
    Field[] fields = BatchUtil.getDeclaredFields(this.step.getProcessor());
    for (Field field : fields) {
        if (Validation.isFieldAnnotatedWith(field, Context.class)) {
            LOG.log(Level.INFO,
                    BatchPropertiesUtil.getInstance().getMessage(BatchKeys.BATCH_INJECTOR_INFO.getKey(),
                            new String[] { BatchKeys.CONTEXT.getKey(), field.getName() }));
            field.setAccessible(Boolean.TRUE);
            field.set(this.step.getProcessor(), createContext());
        }//from   www.  ja  va2s .c o  m
    }
}

From source file:com.aalto.controllers.ProjectController.java

@RequestMapping(value = "/projects", method = RequestMethod.GET)
public Map<Long, Project> getAllProjects() {
    logger.log(Level.INFO, "log: ProjectController projects!!");

    Map<Long, Project> projects = (HashMap) this.projectRepo.findAll();

    return projects;
}