set the value log If you omit the file attribute, specifies the standard log file in which to
write the message. Ignored if you specify a file attribute

@param log value to set
@throws ApplicationException
517484
public void setLog(String log) throws ApplicationException {
	if (StringUtil.isEmpty(log, true)) return;
	this.log = log.trim();
	// throw new ApplicationException("invalid value for attribute log ["+log+"]","valid values are
	// [application, scheduler,console]");
    }
1015254
public void setTo(Object to) throws ApplicationException {
	if (StringUtil.isEmpty(to)) return;
	try {
	    smtp.addTo(to);
	}
	catch (Exception e) {
	    throw new ApplicationException("attribute [to] of the tag [mail] is invalid", e.getMessage());
	}
    }
535354
public void setMailLog(String logFile, String level) throws PageException {
	checkWriteAccess();
	boolean hasAccess = ConfigWebUtil.hasAccess(config, SecurityManager.TYPE_MAIL);

	if (!hasAccess) throw new SecurityException("no access to update mail server settings");
	ConfigWebUtil.getFile(config, config.getRootDirectory(), logFile, FileUtil.TYPE_FILE);

	Element logging = XMLConfigWebFactory.getChildByName(doc.getDocumentElement(), "logging");
	Element[] children = XMLUtil.getChildElementsAsArray(logging);
	Element logger = null;

	for (int i = 0; i < children.length; i++) {
	    if (children[i].getTagName().equals("logger") && "mail".equalsIgnoreCase(children[i].getAttribute("name"))) {
		logger = children[i];
		break;
	    }
	}
	if (logger == null) {
	    logger = doc.createElement("logger");
	    logging.appendChild(logger);
	}
	logger.setAttribute("name", "mail");
	if ("console".equalsIgnoreCase(logFile)) {
	    setClass(logger, null, "appender-", Log4jUtil.appenderClassDefintion("console"));
	    setClass(logger, null, "layout-", Log4jUtil.layoutClassDefintion("pattern"));
	}
	else {
	    setClass(logger, null, "appender-", Log4jUtil.appenderClassDefintion("resource"));
	    setClass(logger, null, "layout-", Log4jUtil.layoutClassDefintion("classic"));
	    logger.setAttribute("appender-arguments", "path:" + logFile);
	}
	logger.setAttribute("log-level", level);
    }
600056
public static final void setJavolutionLogLevel(org.slf4j.Logger log) {
    // disable Javolution info-level logging
    if (log.isTraceEnabled()) {
      javolution.context.LogContext.enter().setLevel(LogContext.Level.DEBUG);
    } else if (log.isDebugEnabled()) {
      javolution.context.LogContext.enter().setLevel(LogContext.Level.DEBUG);
    } else if (log.isInfoEnabled()) {
      javolution.context.LogContext.enter().setLevel(LogContext.Level.INFO);
    } else if (log.isWarnEnabled()) {
      javolution.context.LogContext.enter().setLevel(LogContext.Level.WARNING);
    } else if (log.isErrorEnabled()) {
      javolution.context.LogContext.enter().setLevel(LogContext.Level.ERROR);
    } else {
      javolution.context.LogContext.enter().setLevel(LogContext.Level.FATAL);
    }
  }
363237
private void logs(final String applicationId) throws IOException {
    LOG.log(Level.INFO, "Fetching logs for application [{0}]", applicationId);
    this.logFetcher.fetch(applicationId, new OutputStreamWriter(System.out, StandardCharsets.UTF_8));
  }
893176
public static void setLogfile(Class<? extends IRTLogger> loggerClass,
			File outputFile) throws FileNotFoundException
	{
		for (IRTLogger logger : loggers)
		{
			if (logger.getClass() == loggerClass)
			{
				logger.setLogfile(outputFile);
				logger.dump(true); // Write out and close previous
			}
		}

		enable(true);
	}
380949
private void initXlog() {
    LogConfiguration config = new LogConfiguration.Builder()
        .logLevel(BuildConfig.DEBUG ? LogLevel.ALL             // Specify log level, logs below this level won't be printed, default: LogLevel.ALL
            : LogLevel.NONE)
        .tag(getString(R.string.global_tag))                   // Specify TAG, default: "X-LOG"
        // .t()                                                // Enable thread info, disabled by default
        // .st(2)                                              // Enable stack trace info with depth 2, disabled by default
        // .b()                                                // Enable border, disabled by default
        // .jsonFormatter(new MyJsonFormatter())               // Default: DefaultJsonFormatter
        // .xmlFormatter(new MyXmlFormatter())                 // Default: DefaultXmlFormatter
        // .throwableFormatter(new MyThrowableFormatter())     // Default: DefaultThrowableFormatter
        // .threadFormatter(new MyThreadFormatter())           // Default: DefaultThreadFormatter
        // .stackTraceFormatter(new MyStackTraceFormatter())   // Default: DefaultStackTraceFormatter
        // .borderFormatter(new MyBoardFormatter())            // Default: DefaultBorderFormatter
        // .addObjectFormatter(AnyClass.class,                 // Add formatter for specific class of object
        //     new AnyClassObjectFormatter())                  // Use Object.toString() by default
        .addInterceptor(new BlacklistTagsFilterInterceptor(    // Add blacklist tags filter
            "blacklist1", "blacklist2", "blacklist3"))
        // .addInterceptor(new WhitelistTagsFilterInterceptor( // Add whitelist tags filter
        //     "whitelist1", "whitelist2", "whitelist3"))
        // .addInterceptor(new MyInterceptor())                // Add a log interceptor
        .build();

    Printer androidPrinter = new AndroidPrinter();             // Printer that print the log using android.util.Log
    Printer filePrinter = new FilePrinter                      // Printer that print the log to the file system
        .Builder(new File(Environment.getExternalStorageDirectory(), "xlogsample").getPath())       // Specify the path to save log file
        .fileNameGenerator(new DateFileNameGenerator())        // Default: ChangelessFileNameGenerator("log")
        // .backupStrategy(new MyBackupStrategy())             // Default: FileSizeBackupStrategy(1024 * 1024)
        // .cleanStrategy(new FileLastModifiedCleanStrategy(MAX_TIME))     // Default: NeverCleanStrategy()
        .flattener(new ClassicFlattener())                     // Default: DefaultFlattener
        .build();

    XLog.init(                                                 // Initialize XLog
        config,                                                // Specify the log configuration, if not specified, will use new LogConfiguration.Builder().build()
        androidPrinter,                                        // Specify printers, if no printer is specified, AndroidPrinter(for Android)/ConsolePrinter(for java) will be used.
        filePrinter);

    // For future usage: partial usage in MainActivity.
    globalFilePrinter = filePrinter;
  }
355866
public static void setLogTag(final String logTag) {
        Logger.logTag = TextUtils.isEmpty(logTag) ? LOG_TAG : logTag;
    }
915262
@Override
	public SqlAgentFactory setOutputExceptionLog(final boolean outputExceptionLog) {
		getDefaultProps().put(PROPS_KEY_OUTPUT_EXCEPTION_LOG, Boolean.toString(outputExceptionLog));
		return this;
	}
1021824
static void write(List<AccessLogComponent> format, RequestLog log) {
        final VirtualHost host = ((ServiceRequestContext) log.context()).virtualHost();
        final Logger logger = host.accessLogger();
        if (!format.isEmpty() && logger.isInfoEnabled()) {
            logger.info(format(format, log));
        }
    }
589747
public void setType(String type) throws ApplicationException {
	type = type.toLowerCase().trim();
	if (type.equals("information")) this.type = lucee.commons.io.log.Log.LEVEL_INFO;
	else if (type.equals("info")) this.type = lucee.commons.io.log.Log.LEVEL_INFO;
	else if (type.equals("warning")) this.type = lucee.commons.io.log.Log.LEVEL_WARN;
	else if (type.equals("warn")) this.type = lucee.commons.io.log.Log.LEVEL_WARN;
	else if (type.equals("error")) this.type = lucee.commons.io.log.Log.LEVEL_ERROR;
	else if (type.startsWith("fatal")) this.type = lucee.commons.io.log.Log.LEVEL_FATAL;
	else if (type.startsWith("debug")) this.type = lucee.commons.io.log.Log.LEVEL_DEBUG;
	else if (type.startsWith("trace")) this.type = lucee.commons.io.log.Log.LEVEL_TRACE;
	else throw new ApplicationException("invalid value for attribute type [" + type + "]", "valid values are [information,warning,error,fatal,debug]");

    }
25642
public static void log( String context , JMSException e , Log log )
	{
		StringBuilder message = new StringBuilder();
		if (context != null)
		{
			message.append("[");
			message.append(context);
			message.append("] ");
		} 
		if (e.getErrorCode() != null)
		{
			message.append("error={");
			message.append(e.getErrorCode());
			message.append("} ");
		}
		message.append(e.getMessage());
		log.error(message.toString());
		if (e.getLinkedException() != null)
			log.error("Linked exception was :",e.getLinkedException());
	}
971621
public final void setLogLevel(LogLevel logLevel)
    {
        LogLevel updatedLogLevel=logLevel;
        if(updatedLogLevel==null)
        {
            updatedLogLevel=LogLevel.NONE;
        }
        
        this.logLevel=updatedLogLevel;
    }
1054637
@SuppressWarnings("unchecked")
    public static boolean setInputData(Map<String, Object> inp, Object comp, Logger log) {
        PrintWriter w = null;
        File file = null;
        boolean success = true;
        ComponentAccess cp = new ComponentAccess(comp);
        inp = convert(inp);
        for (Access in : cp.inputs()) {
            String fieldName = in.getField().getName();
            Class fieldType = in.getField().getType();
            Object inpValue = inp.get(fieldName);
            if (inpValue != null) {
                // allow files and dates provided as strings and
                // convert them
                try {
                    inpValue = conv(inpValue, fieldType);
                    // check the range if possible.
                    if (Number.class.isAssignableFrom(fieldType) || fieldType == double.class || fieldType == float.class || fieldType == int.class) {
                        Range range = in.getField().getAnnotation(Range.class);
                        if (range != null) {
                            double v = ((Number) inpValue).doubleValue();
                            if (!Annotations.inRange(range, v)) {
                                if (log.isLoggable(Level.WARNING)) {
                                    log.warning("Value '" + v + "' not in Range: " + range);
                                }
                            }
                        }
                    }
                    in.setFieldValue(inpValue);
                    if (log.isLoggable(Level.CONFIG)) {
                        log.config("@In " + comp.getClass().getName() + "@" + fieldName + " <- '" + inpValue + "'");
                    }
                } catch (Exception ex) {
                    throw new ComponentException("Failed setting '" + fieldName + "' type " + in.getField().getType().getCanonicalName() + " <- " + ex.getMessage());
                }
                continue;
            } else {
                if (System.getProperty("oms.check_params") != null) {
                    try {
                        if (w == null) {
                            file = new File(System.getProperty("oms3.work", System.getProperty("user.dir")), "missing_params.csv");
                            w = new PrintWriter(new FileWriter(file));
                            w.println("# Missing parameter, copy those entries into one of your parameter files.");
                        }
                        String val = null;
                        Bound b = null;
                        Object o = in.getFieldValue();
                        if (o != null) {
                            val = o.toString();
                        } else {
                            b = in.getField().getAnnotation(Bound.class);
                            if (b != null) {
                                try {
                                    Object v = inp.get(b.value());
                                    if (v == null) {
                                        v = new Integer(0);
                                    }
                                    int dim = Integer.parseInt(v.toString());
                                    int[] d = new int[dim];
                                    val = Conversions.convert(d, String.class);
                                } catch (NumberFormatException E) {
                                    val = "?";
                                }
                            } else {
                                val = "?";
                            }
                        }
                        w.println("@P, " + fieldName + ",  \"" + val + "\"");
                        if (b != null) {
                            w.println(" bound, " + b.value());
                        }
                    } catch (Exception E) {
                        throw new RuntimeException(E);
                    }
                }
                if (log.isLoggable(Level.WARNING)) {
                    log.warning("No Input for '" + fieldName + "'");
                }
            }
        }
        if (w != null) {
            w.close();
            System.out.println("Missing parameter [" + file + "]");
            success = false;
        }
        return success;
    }
200560
def setLog(self, fileName, writeName=False):
        
        self.log = 1
        self.logFile = fileName
        self._logPtr = open(fileName, "w")
        if writeName:
            self._namePtr = open(fileName + ".name", "w")
143917
public void setLogRecord(java.util.Map<String, String> logRecord) {
        this.logRecord = logRecord == null ? null : new com.amazonaws.internal.SdkInternalMap<String, String>(logRecord);
    }
754139
public static function setDefaultLog( $defaultLog )
    {
        if ( null === $defaultLog )
        {
            static::$_defaultLog = null;

            return;
        }

        //	Set up a new log file...
        static::$_logger = null;
        \Kisma::set( 'app.log_file_path', static::$_logFilePath = dirname( $defaultLog ) );
        \Kisma::set( 'app.log_file_name', static::$_logFileName = basename( $defaultLog ) );

        static::_checkLogFile();
    }