@google-cloud/logging
The default export of the @google-cloud/logging
package is the
Logging class.
See Logging and ClientConfig for client methods and configuration options.
Examples
Install the client library with npm:
npm install --save @google-cloud/logging
Import the client library
const {Logging} = require('@google-cloud/logging');
Create a client that uses Application Default Credentials (ADC):
const logging = new Logging();
Create a client with explicit credentials:
const logging = new Logging({
projectId: 'your-project-id',
keyFilename: '/path/to/keyfile.json'
});
Full quickstart example:
Properties
Entry
Reference to the Entry class.
- See also
- Entry
Log
Reference to the Log class.
- See also
- Log
Sink
Reference to the Sink class.
- See also
- Sink
v2
object
Reference to the low-level auto-generated clients for the V2 Logging service.
Properties
Parameter |
|
---|---|
LoggingServiceV2Client |
constructor Reference to v2.LoggingServiceV2Client |
ConfigServiceV2Client |
constructor Reference to v2.ConfigServiceV2Client |
MetricsServiceV2Client |
constructor Reference to v2.MetricsServiceV2Client |