Examples of PropertiesUtil


Examples of org.apache.logging.log4j.util.PropertiesUtil

    /**
     * <em>Consider private, used for testing.</em>
     */
    static void init() {
        contextMap = null;
        final PropertiesUtil managerProps = PropertiesUtil.getProperties();
        disableAll = managerProps.getBooleanProperty(DISABLE_ALL);
        useStack = !(managerProps.getBooleanProperty(DISABLE_STACK) || disableAll);
        useMap = !(managerProps.getBooleanProperty(DISABLE_MAP) || disableAll);

        contextStack = new DefaultThreadContextStack(useStack);
        String threadContextMapName = managerProps.getStringProperty(THREAD_CONTEXT_KEY);
        final ClassLoader cl = ProviderUtil.findClassLoader();
        if (threadContextMapName != null) {
            try {
                final Class<?> clazz = cl.loadClass(threadContextMapName);
                if (ThreadContextMap.class.isAssignableFrom(clazz)) {
View Full Code Here

Examples of org.apache.logging.log4j.util.PropertiesUtil

            follow ? new PrintStream(new SystemOutStream(), true, enc) : System.out :
            follow ? new PrintStream(new SystemErrStream(), true, enc) : System.err;
        } catch (final UnsupportedEncodingException ex) { // should never happen
            throw new IllegalStateException("Unsupported default encoding " + enc, ex);
        }
        final PropertiesUtil propsUtil = PropertiesUtil.getProperties();
        if (!propsUtil.getStringProperty("os.name").startsWith("Windows") ||
            propsUtil.getBooleanProperty("log4j.skipJansi")) {
            return printStream;
        }
        try {
            final ClassLoader loader = Loader.getClassLoader();
            // We type the parameter as a wildcard to avoid a hard reference to Jansi.
View Full Code Here

Examples of org.apache.logging.log4j.util.PropertiesUtil

    private static OutputStream getOutputStream(final boolean follow, final Target target) {
        final PrintStream printStream = target == Target.SYSTEM_OUT ?
            follow ? new PrintStream(new SystemOutStream()) : System.out :
            follow ? new PrintStream(new SystemErrStream()) : System.err;
        PropertiesUtil propsUtil = PropertiesUtil.getProperties();
        if (!propsUtil.getStringProperty("os.name").startsWith("Windows") ||
            propsUtil.getBooleanProperty("log4j.skipJansi")) {
            return printStream;
        } else {
            try {
                final ClassLoader loader = Loader.getClassLoader();
                // We type the parameter as a wildcard to avoid a hard reference to Jansi.
View Full Code Here

Examples of org.apache.logging.log4j.util.PropertiesUtil

    private final PrintStream stream;

    private final ConcurrentMap<String, Logger> loggers = new ConcurrentHashMap<String, Logger>();

    public SimpleLoggerContext() {
        props = new PropertiesUtil("log4j2.simplelog.properties");

        showContextMap = props.getBooleanProperty(SYSTEM_PREFIX + "showContextMap", false);
        showLogName = props.getBooleanProperty(SYSTEM_PREFIX + "showlogname", false);
        showShortName = props.getBooleanProperty(SYSTEM_PREFIX + "showShortLogname", true);
        showDateTime = props.getBooleanProperty(SYSTEM_PREFIX + "showdatetime", false);
View Full Code Here

Examples of org.apache.logging.log4j.util.PropertiesUtil

    }
   
    // LOG4J2-479: by default, use a plain ThreadLocal, only use InheritableThreadLocal if configured.
    // (This method is package protected for JUnit tests.)
    static ThreadLocal<Map<String, String>> createThreadLocalMap(final boolean isMapEnabled) {
        final PropertiesUtil managerProps = PropertiesUtil.getProperties();
        final boolean inheritable = managerProps.getBooleanProperty(INHERITABLE_MAP);
        if (inheritable) {
            return new InheritableThreadLocal<Map<String, String>>() {
                @Override
                protected Map<String, String> childValue(final Map<String, String> parentValue) {
                    return parentValue != null && isMapEnabled //
View Full Code Here

Examples of org.apache.logging.log4j.util.PropertiesUtil

    private final PrintStream stream;

    private final ConcurrentMap<String, Logger> loggers = new ConcurrentHashMap<String, Logger>();

    public SimpleLoggerContext() {
        props = new PropertiesUtil("log4j2.simplelog.properties");

        showContextMap = props.getBooleanProperty(SYSTEM_PREFIX + "showContextMap", false);
        showLogName = props.getBooleanProperty(SYSTEM_PREFIX + "showlogname", false);
        showShortName = props.getBooleanProperty(SYSTEM_PREFIX + "showShortLogname", true);
        showDateTime = props.getBooleanProperty(SYSTEM_PREFIX + "showdatetime", false);
View Full Code Here

Examples of org.apache.logging.log4j.util.PropertiesUtil

    private final PrintStream stream;

    private final ConcurrentMap<String, Logger> loggers = new ConcurrentHashMap<String, Logger>();

    public SimpleLoggerContext() {
        props = new PropertiesUtil("log4j2.simplelog.properties");

        showContextMap = props.getBooleanProperty(SYSTEM_PREFIX + "showContextMap", false);
        showLogName = props.getBooleanProperty(SYSTEM_PREFIX + "showlogname", false);
        showShortName = props.getBooleanProperty(SYSTEM_PREFIX + "showShortLogname", true);
        showDateTime = props.getBooleanProperty(SYSTEM_PREFIX + "showdatetime", false);
View Full Code Here

Examples of org.apache.logging.log4j.util.PropertiesUtil

            follow ? new PrintStream(new SystemOutStream(), true, enc) : System.out :
            follow ? new PrintStream(new SystemErrStream(), true, enc) : System.err;
        } catch (final UnsupportedEncodingException ex) { // should never happen
            throw new IllegalStateException("Unsupported default encoding " + enc, ex);
        }
        final PropertiesUtil propsUtil = PropertiesUtil.getProperties();
        if (!propsUtil.getStringProperty("os.name").startsWith("Windows") ||
            propsUtil.getBooleanProperty("log4j.skipJansi")) {
            return printStream;
        } else {
            try {
                final ClassLoader loader = Loader.getClassLoader();
                // We type the parameter as a wildcard to avoid a hard reference to Jansi.
View Full Code Here

Examples of org.apache.logging.log4j.util.PropertiesUtil

            follow ? new PrintStream(new SystemOutStream(), true, enc) : System.out :
            follow ? new PrintStream(new SystemErrStream(), true, enc) : System.err;
        } catch (final UnsupportedEncodingException ex) { // should never happen
            throw new IllegalStateException("Unsupported default encoding " + enc, ex);
        }
        final PropertiesUtil propsUtil = PropertiesUtil.getProperties();
        if (!propsUtil.getStringProperty("os.name").startsWith("Windows") ||
            propsUtil.getBooleanProperty("log4j.skipJansi")) {
            return printStream;
        }
        try {
            final ClassLoader loader = Loader.getClassLoader();
            // We type the parameter as a wildcard to avoid a hard reference to Jansi.
View Full Code Here

Examples of org.jeecgframework.core.util.PropertiesUtil

    sb.append("<textarea id=\"" + name + "_text\" name=\"" + name + "\">"
        + value + "</textarea>");
    sb.append("<script type=\"text/javascript\">var ckeditor_" + name
        + "=CKEDITOR.replace(\"" + name + "_text\",{");
    if (isfinder) {
      PropertiesUtil util = new PropertiesUtil("sysConfig.properties");
      sb.append("filebrowserBrowseUrl:"
          + util.readProperty("filebrowserBrowseUrl") + ",");
      sb.append("filebrowserImageBrowseUrl:"
          + util.readProperty("filebrowserImageBrowseUrl") + ",");
      sb.append("filebrowserFlashBrowseUrl:"
          + util.readProperty("filebrowserFlashBrowseUrl") + ",");
      sb.append("filebrowserUploadUrl:"
          + util.readProperty("filebrowserUploadUrl") + ",");
      sb.append("filebrowserImageUploadUrl:"
          + util.readProperty("filebrowserImageUploadUrl") + ",");
      sb.append("filebrowserFlashUploadUrl:"
          + util.readProperty("filebrowserFlashUploadUrl") + "");
    }
    if (isfinder && StringUtil.isNotEmpty(type))
      sb.append(",");
    if (StringUtil.isNotEmpty(type))
      sb.append(type);
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.