Send feedback
Class LoggingBunyan (3.0.2)
Stay organized with collections
Save and categorize content based on your preferences.
Version 3.0.2 keyboard_arrow_down
Inheritance
Writable
>
LoggingBunyan
Package
@google-cloud/logging-bunyan!
Constructors
(constructor)(options)
constructor(options?: types.Options);
Constructs a new instance of the LoggingBunyan
class
Parameter
Name Description options
types.Options
Properties
stackdriverLog
stackdriverLog: types.StackdriverLog;
Property Value
Type Description types.StackdriverLog
Methods
_write(record, encoding, callback)
_write(record: types.BunyanLogRecord, encoding: string, callback: Function): void;
Relay a log entry to the logging agent. This is called by bunyan through Writable#write.
Parameters
Name Description record
types.BunyanLogRecord
encoding
string
callback
Function
Returns
_writev(chunks, callback)
_writev(chunks: Array<{
chunk: any;
encoding: string;
}>, callback: Function): void;
Relay an array of log entries to the logging agent. This is called by bunyan through Writable#write.
Parameters
Name Description chunks
Array <{
chunk: any;
encoding: string;
}>
callback
Function
Returns
properLabels(labels)
static properLabels(labels: any): boolean;
Parameter
Name Description labels
any
Returns
stream(level)
stream(level: types.LogLevel): types.StreamResponse;
Convenience method that Builds a bunyan stream object that you can put in the bunyan streams list.
Parameter
Name Description level
types.LogLevel
Returns
Type Description types.StreamResponse
write(record, callback)
write(record: types.BunyanLogRecord, callback?: Function): boolean;
Intercept log entries as they are written so we can attempt to add the trace ID in the same continuation as the function that wrote the log, because the trace agent currently uses continuation local storage for the trace context.
By the time the Writable stream buffer gets flushed and _write gets called we may well be in a different continuation.
Parameters
Name Description record
types.BunyanLogRecord
callback
Function
Returns
write(record, encoding, callback)
write(record: types.BunyanLogRecord, encoding?: string, callback?: Function): boolean;
Parameters
Name Description record
types.BunyanLogRecord
encoding
string
callback
Function
Returns
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-16 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?