[VARIABLE "my_log_name"]
497405
public void write(String logName) {
    // [START logging_write_log_entry]
    List<LogEntry> entries = new ArrayList<>();
    entries.add(LogEntry.of(StringPayload.of("Entry payload")));
    Map<String, Object> jsonMap = new HashMap<>();
    jsonMap.put("key", "value");
    entries.add(LogEntry.of(JsonPayload.of(jsonMap)));
    logging.write(
        entries,
        WriteOption.logName(logName),
        WriteOption.resource(MonitoredResource.newBuilder("global").build()));
    // [END logging_write_log_entry]
  }
1102924
private String getEventLogName(String subject, String id) {
    return String.format("%s-%s", subject, id);
  }
1337094
def logvalue(self, key, value):
        """"""
        if not hasattr(self, 'logvalues'):
            self.logvalues = {}
        self.logvalues[key] = value
698032
public String getWithLog(String key) {
		final String value = getStr(key);
		if (value == null) {
			log.debug("No key define for [{}]!", key);
		}
		return value;
	}
513204
@Override
	public long getLogFileTimestamp(File file) {
		String name = file.getName();
		// Check name for extension
		if (name == null || name.length() == 0 || !name.startsWith(TEXTLOGPREF) || !name.endsWith(TEXTLOGEXT)) {
			return -1L;
		}
		long result = -1L;
		try {
			Date date = DATEFORMAT.parse(name.substring(TEXTLOGPREF.length(), name.length() - TEXTLOGEXT.length()));
			result = date.getTime();
		} catch (ParseException ex) {
			// Fall through to return -1L;
		}
		return result;
	}
880434
public static void info(Logger log, String methodName, Object... params) {
        if (log.isInfoEnabled())
            log.info(buildMethodLogString(methodName, params));
    }
988484
@Nullable
  @OverrideOnDemand
  protected String getLoginName (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope)
  {
    return aRequestScope.params ().getAsString (CLogin.REQUEST_ATTR_USERID);
  }
646188
private void logDescription(LoggingStrategy loggingStrategy, Rule rule) {
        String description = rule.getDescription();
        StringTokenizer tokenizer = new StringTokenizer(description, "\n");
        while (tokenizer.hasMoreTokens()) {
            loggingStrategy.log(tokenizer.nextToken().replaceAll("(\\r|\\n|\\t)", ""));
        }
    }
594823
public static Logger getLogger(String name) {
        ILoggerFactory iLoggerFactory = getILoggerFactory();
        return iLoggerFactory.getLogger(name);
    }
451830
public boolean deleteLogAsync(String logName) throws ExecutionException, InterruptedException {
    // [START deleteLogAsync]
    Future<Boolean> future = logging.deleteLogAsync(logName);
    // ...
    boolean deleted = future.get();
    if (deleted) {
      // the log was deleted
    } else {
      // the log was not found
    }
    // [END deleteLogAsync]
    return deleted;
  }
48040
public boolean isLogger(String loggerName) throws Exception {
        Address addr = Address.root().add(SUBSYSTEM, LOGGING, LOGGER, loggerName);
        return null != readResource(addr);
    }
481091
static public Log getInstance(String name) {
        Log log = (logs.get(name));
        if (null == log) {
            log = makeNewLogInstance(name);
            Log log2 = logs.putIfAbsent(name, log);
            if (log2 != null) {
                return log2;
            }
        }
        return log;
    }
1101908
public List<String> getLoggerNames() {
      return Collections.list(java.util.logging.LogManager.getLogManager().getLoggerNames());
   }
34544
public synchronized static Logging getLogger(final String name) {
    Logging logger = loggers.get(name);
    if(logger == null) {
      logger = new Logging(Logger.getLogger(name));
      loggers.put(name, logger);
    }
    return logger;
  }
338218
public void log(Logger log)
    {
        // only print overflow if there is any
        int nameCount;
        if (buckets.get(buckets.length() - 1) == 0)
            nameCount = buckets.length() - 1;
        else
            nameCount = buckets.length();
        String[] names = new String[nameCount];

        int maxNameLength = 0;
        for (int i = 0; i < nameCount; i++)
        {
            names[i] = nameOfRange(bucketOffsets, i);
            maxNameLength = Math.max(maxNameLength, names[i].length());
        }

        // emit log records
        String formatstr = "%" + maxNameLength + "s: %d";
        for (int i = 0; i < nameCount; i++)
        {
            long count = buckets.get(i);
            // sort-of-hack to not print empty ranges at the start that are only used to demarcate the
            // first populated range. for code clarity we don't omit this record from the maxNameLength
            // calculation, and accept the unnecessary whitespace prefixes that will occasionally occur
            if (i == 0 && count == 0)
                continue;
            log.debug(String.format(formatstr, names[i], count));
        }
    }
955601
public void addLog(final String name) {
        ErrorLogger log = new ErrorLogger(name);
        logs.put(name, log);
        log.setVerboseDebug(debugLevel);
    }
639469
def log(self, *args):
        '''
        
        '''
        if len(args):
            self._log = args[0]
        else:
            return self._log