* Sets the desired logging level for a particular log type. * @param {(string|Type)} type The log type. * @param {(!Level|string|number)} level The desired log level. * @throws {TypeError} if `type` is not a `string`.
(type, level)
| 662 | * @throws {TypeError} if `type` is not a `string`. |
| 663 | */ |
| 664 | setLevel(type, level) { |
| 665 | if (typeof type !== 'string') { |
| 666 | throw TypeError('specified log type is not a string: ' + typeof type) |
| 667 | } |
| 668 | this.prefs_.set(type, level instanceof Level ? level : getLevel(level)) |
| 669 | } |
| 670 | |
| 671 | /** |
| 672 | * Converts this instance to its JSON representation. |