Search in sources :

Example 6 with Logger

use of java.lang.System.Logger in project Bytecoder by mirkosertic.

the class BootstrapLogger method log.

@Override
public void log(Level level, ResourceBundle bundle, String format, Object... params) {
    if (checkBootstrapping()) {
        push(LogEvent.valueOf(this, level, bundle, format, params));
    } else {
        final Logger spi = holder.wrapped();
        spi.log(level, bundle, format, params);
    }
}
Also used : PlatformLogger(sun.util.logging.PlatformLogger) Logger(java.lang.System.Logger)

Example 7 with Logger

use of java.lang.System.Logger in project Bytecoder by mirkosertic.

the class BootstrapLogger method log.

@Override
public void log(Level level, Object obj) {
    if (checkBootstrapping()) {
        Logger.super.log(level, obj);
    } else {
        final Logger spi = holder.wrapped();
        spi.log(level, obj);
    }
}
Also used : PlatformLogger(sun.util.logging.PlatformLogger) Logger(java.lang.System.Logger)

Example 8 with Logger

use of java.lang.System.Logger in project Bytecoder by mirkosertic.

the class BootstrapLogger method log.

@Override
public void log(Level level, String format, Object... params) {
    if (checkBootstrapping()) {
        push(LogEvent.valueOf(this, level, null, format, params));
    } else {
        final Logger spi = holder.wrapped();
        spi.log(level, format, params);
    }
}
Also used : PlatformLogger(sun.util.logging.PlatformLogger) Logger(java.lang.System.Logger)

Example 9 with Logger

use of java.lang.System.Logger in project Bytecoder by mirkosertic.

the class BootstrapLogger method log.

@Override
public void log(Level level, Supplier<String> msgSupplier) {
    if (checkBootstrapping()) {
        push(LogEvent.valueOf(this, level, msgSupplier));
    } else {
        final Logger spi = holder.wrapped();
        spi.log(level, msgSupplier);
    }
}
Also used : PlatformLogger(sun.util.logging.PlatformLogger) Logger(java.lang.System.Logger)

Example 10 with Logger

use of java.lang.System.Logger in project Bytecoder by mirkosertic.

the class BootstrapLogger method flush.

// Flushes the queue of pending LogEvents to the logger.
void flush(LogEvent event) {
    assert event.bootstrap == this;
    if (event.platformLevel != null) {
        PlatformLogger.Bridge concrete = holder.getConcretePlatformLogger(this);
        LogEvent.log(event, concrete);
    } else {
        Logger concrete = holder.getConcreteLogger(this);
        LogEvent.log(event, concrete);
    }
}
Also used : PlatformLogger(sun.util.logging.PlatformLogger) PlatformLogger(sun.util.logging.PlatformLogger) Logger(java.lang.System.Logger)

Aggregations

Logger (java.lang.System.Logger)58 IOException (java.io.IOException)39 ArrayList (java.util.ArrayList)38 FileOutputStream (java.io.FileOutputStream)36 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)34 SAXException (org.xml.sax.SAXException)34 URISyntaxException (java.net.URISyntaxException)28 File (java.io.File)23 Element (com.maxprograms.xml.Element)22 Document (com.maxprograms.xml.Document)17 FileInputStream (java.io.FileInputStream)16 PlatformLogger (sun.util.logging.PlatformLogger)16 SAXBuilder (com.maxprograms.xml.SAXBuilder)14 XMLOutputter (com.maxprograms.xml.XMLOutputter)14 Catalog (com.maxprograms.xml.Catalog)13 BufferedReader (java.io.BufferedReader)13 InputStreamReader (java.io.InputStreamReader)11 Segmenter (com.maxprograms.segmenter.Segmenter)7 Level (java.lang.System.Logger.Level)7 HashMap (java.util.HashMap)5