MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / deprecate

Method deprecate

javascript/selenium-webdriver/lib/logging.js:416–428  ·  view source on GitHub ↗

* Logs a deprecation notice at the Level.WARNING log level, once per * `id` for this logger's lifetime — a repeat call with the same `id` is a * no-op, matching the once-only behavior `util.deprecate` gives by call-site * identity, but keyed on a stable id instead so it survives bei

(id, message)

Source from the content-addressed store, hash-verified

414 * @throws {TypeError} if `id` is empty.
415 */
416 deprecate(id, message) {
417 if (!id) {
418 throw new TypeError('Logger#deprecate() requires a non-empty id')
419 }
420 if (this.deprecated_.has(id)) {
421 return
422 }
423 if (!this.isLoggable(Level.WARNING)) {
424 return
425 }
426 this.deprecated_.add(id)
427 this.warning(`[${id}] ${message}`)
428 }
429
430 /**
431 * Logs a message at the {@link Level.DEBUG} log level.

Callers 4

installAddonMethod · 0.45
uninstallAddonMethod · 0.45
webdriver.jsFile · 0.45
logging_test.jsFile · 0.45

Calls 4

isLoggableMethod · 0.95
warningMethod · 0.95
addMethod · 0.65
hasMethod · 0.45

Tested by

no test coverage detected