addTag method

void addTag(
  1. String key, [
  2. String? value
])

Add a tag to all future logs sent by this logger.

The tag will take the form "key:value" or "key" if no value is provided.

Tags must start with a letter and after that may contain the following characters: Alphanumerics, Underscores, Minuses, Colons, Periods, Slashes. Other special characters are converted to underscores.

Tags must be lowercase, and can be at most 200 characters. If the tag you provide is longer, only the first 200 characters will be used.

See also: Defining Tags

Implementation

void addTag(String key, [String? value]) {
  wrap('logs.addTag', _internalLogger, null, () {
    return _platform.addTag(loggerHandle, key, value);
  });
}