WarningLog
Namespace: Vercel.AI.Operations
public static class WarningLogWarning logger. Observer sees every call, including empty warning lists.
Logger maps to globalThis.AI_SDK_LOG_WARNINGS.
Inheritance: object
Properties
Section titled “Properties”Logger
Section titled “Logger”public static object? Logger { get; set; }Custom logger. false suppresses logging. A delegate receives nonempty warnings.
Value: object
Observer
Section titled “Observer”public static Action<WarningLogContext>? Observer { get; set; }Receives every log attempt, including an empty warning list.
Value: Action<WarningLogContext>
Methods
Section titled “Methods”Write(IReadOnlyList<OperationWarning>?, string?, string?)
Section titled “Write(IReadOnlyList<OperationWarning>?, string?, string?)”public static void Write(IReadOnlyList<OperationWarning>? warnings, string? provider, string? model)Records warnings for one model call.
Parameters
| Name | Type | Description |
|---|---|---|
warnings |
IReadOnlyList<OperationWarning> | |
provider |
string | |
model |
string |
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product