Interface Options (6.0.0)

Inheritance

LoggingOptions > Options

Package

@google-cloud/logging-winston

Properties

defaultCallback

defaultCallback?: Callback;

format

format?: any;

Additional parameters for . For more information on parameters, please see [winston-transport](https://github.com/winstonjs/winston-transport/blob/0e5e4c0056188a74e24407ee066902fb113bd8de/index.js#L8).

handleExceptions

handleExceptions?: boolean;

handleRejections

handleRejections?: boolean;

inspectMetadata

inspectMetadata?: boolean;

Serialize winston-provided log metadata using util.inspect.

labels

labels?: {
        [key: string]: string;
    };

level

level?: string;

The default log level. Winston will filter messages with a severity lower than this.

levels

levels?: {
        [name: string]: number;
    };

Custom logging levels as supported by winston. This list is used to translate your log level to the Cloud Logging level. Each property should have an integer value between 0 (most severe) and 7 (least severe). If you are passing a list of levels to your winston logger, you should provide the same list here.

logname

logname?: string;

logName

logName?: string;

The name of the log that will receive messages written to this transport.

maxEntrySize

maxEntrySize?: number;

prefix

prefix?: string;

redirectToStdout

redirectToStdout?: boolean;

Boolen flag that opts-in redirecting the output to STDOUT instead of ingesting logs to Cloud Logging using Logging API. Defaults to . Redirecting logs can be used in Google Cloud environments with installed logging agent to delegate log ingestions to the agent. Redirected logs are formatted as one line Json string following the structured logging guidelines.

resource

resource?: MonitoredResource;

The monitored resource that the transport corresponds to. On Google Cloud Platform, this is detected automatically, but you may optionally specify a specific monitored resource. For more information see the [official documentation]https://cloud.google.com/logging/docs/api/reference/rest/v2/MonitoredResource.

serviceContext

serviceContext?: ServiceContext;

For logged errors, we provide this as the service context. For more information see [this guide]https://cloud.google.com/error-reporting/docs/formatting-error-messages and the [official documentation]https://cloud.google.com/error-reporting/reference/rest/v1beta1/ServiceContext.

silent

silent?: boolean;

useMessageField

useMessageField?: boolean;

Boolean flag indicating if "message" field should be used to store structured, non-text data inside jsonPayload field. This flag applies only when is set. By default this value is true