@loglayer/transport-google-cloud-logging 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +100 -0
- package/dist/index.cjs +49 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +20 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/package.json +65 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Theo Gravity
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Google Cloud Logging Transport for LogLayer
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@loglayer/transport-google-cloud-logging)
|
|
4
|
+
[](https://www.npmjs.com/package/@loglayer/transport-google-cloud-logging)
|
|
5
|
+
[](http://www.typescriptlang.org/)
|
|
6
|
+
|
|
7
|
+
Implements the [Google Cloud Logging library](https://www.npmjs.com/package/@google-cloud/logging) for use with [LogLayer](https://loglayer.dev).
|
|
8
|
+
|
|
9
|
+
This transport sends logs to [Google Cloud Logging](https://cloud.google.com/logging) (formerly known as Stackdriver Logging).
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @loglayer/transport-google-cloud-logging @google-cloud/logging serialize-error
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Notes
|
|
18
|
+
|
|
19
|
+
This transport uses `log.entry(metadata, data)` as described in the library documentation.
|
|
20
|
+
|
|
21
|
+
- The `metadata` portion is not the data from `withMetadata()` or `withContext()`. See the `rootLevelData` option
|
|
22
|
+
for this transport on how to modify this value.
|
|
23
|
+
- The `data` portion is actually the `jsonPayload` is what the transport uses for all LogLayer data.
|
|
24
|
+
- The message data is stored in `jsonPayload.message`
|
|
25
|
+
|
|
26
|
+
For more information, see [Structured Logging](https://cloud.google.com/logging/docs/structured-logging), specifically
|
|
27
|
+
[LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry).
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
import { LogLayer } from "loglayer";
|
|
33
|
+
import { GoogleCloudLoggingTransport } from "@loglayer/transport-google-cloud-logging";
|
|
34
|
+
import { Logging } from '@google-cloud/logging';
|
|
35
|
+
import { serializeError } from "serialize-error";
|
|
36
|
+
|
|
37
|
+
// Create the logging client
|
|
38
|
+
const logging = new Logging({ projectId: "GOOGLE_CLOUD_PLATFORM_PROJECT_ID" });
|
|
39
|
+
const log = logging.log('my-log');
|
|
40
|
+
|
|
41
|
+
// Create LogLayer instance with the transport
|
|
42
|
+
const logger = new LogLayer({
|
|
43
|
+
errorSerializer: serializeError,
|
|
44
|
+
transport: new GoogleCloudLoggingTransport({
|
|
45
|
+
logger: log,
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// The logs will include the default metadata
|
|
50
|
+
logger.info("Hello from Cloud Run!");
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Configuration Options
|
|
54
|
+
|
|
55
|
+
### `rootLevelData`
|
|
56
|
+
|
|
57
|
+
The root level data to include for all log entries.
|
|
58
|
+
This is not the same as using `withContext()`, which would be included as part of the `jsonPayload`.
|
|
59
|
+
|
|
60
|
+
The `rootLevelData` option accepts any valid [Google Cloud LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry)
|
|
61
|
+
fields except for `severity`, `timestamp`, and `jsonPayload` which are managed by the transport.
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
const logger = new LogLayer({
|
|
65
|
+
transport: new GoogleCloudLoggingTransport({
|
|
66
|
+
logger: log,
|
|
67
|
+
rootLevelData: {
|
|
68
|
+
resource: {
|
|
69
|
+
type: "cloud_run_revision",
|
|
70
|
+
labels: {
|
|
71
|
+
project_id: "my-project",
|
|
72
|
+
service_name: "my-service",
|
|
73
|
+
revision_name: "my-revision",
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
labels: {
|
|
77
|
+
environment: "production",
|
|
78
|
+
version: "1.0.0",
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
}),
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Log Level Mapping
|
|
86
|
+
|
|
87
|
+
LogLayer log levels are mapped to Google Cloud Logging severity levels as follows:
|
|
88
|
+
|
|
89
|
+
| LogLayer Level | Google Cloud Logging Severity |
|
|
90
|
+
|---------------|------------------------------|
|
|
91
|
+
| `fatal` | `CRITICAL` |
|
|
92
|
+
| `error` | `ERROR` |
|
|
93
|
+
| `warn` | `WARNING` |
|
|
94
|
+
| `info` | `INFO` |
|
|
95
|
+
| `debug` | `DEBUG` |
|
|
96
|
+
| `trace` | `DEBUG` |
|
|
97
|
+
|
|
98
|
+
## Documentation
|
|
99
|
+
|
|
100
|
+
For more details, visit [https://loglayer.dev/transports/google-cloud-logging](https://loglayer.dev/transports/google-cloud-logging)
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/GoogleCloudLoggingTransport.ts
|
|
2
|
+
var _transport = require('@loglayer/transport');
|
|
3
|
+
var GoogleCloudLoggingTransport = class extends _transport.BaseTransport {
|
|
4
|
+
|
|
5
|
+
constructor(config) {
|
|
6
|
+
super(config);
|
|
7
|
+
this.rootLevelData = config.rootLevelData || {};
|
|
8
|
+
}
|
|
9
|
+
mapLogLevel(level) {
|
|
10
|
+
switch (level) {
|
|
11
|
+
case _transport.LogLevel.fatal:
|
|
12
|
+
return "CRITICAL";
|
|
13
|
+
case _transport.LogLevel.error:
|
|
14
|
+
return "ERROR";
|
|
15
|
+
case _transport.LogLevel.warn:
|
|
16
|
+
return "WARNING";
|
|
17
|
+
case _transport.LogLevel.info:
|
|
18
|
+
return "INFO";
|
|
19
|
+
case _transport.LogLevel.debug:
|
|
20
|
+
return "DEBUG";
|
|
21
|
+
case _transport.LogLevel.trace:
|
|
22
|
+
return "DEBUG";
|
|
23
|
+
default:
|
|
24
|
+
return "DEFAULT";
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
shipToLogger({ data, hasData, logLevel, messages }) {
|
|
28
|
+
const entry = this.logger.entry(
|
|
29
|
+
{
|
|
30
|
+
...this.rootLevelData,
|
|
31
|
+
severity: this.mapLogLevel(logLevel),
|
|
32
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
...data && hasData ? data : {},
|
|
36
|
+
message: messages.join(" ")
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
this.logger.write(entry);
|
|
40
|
+
if (data && hasData) {
|
|
41
|
+
return [data, messages];
|
|
42
|
+
}
|
|
43
|
+
return [messages];
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
exports.GoogleCloudLoggingTransport = GoogleCloudLoggingTransport;
|
|
49
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/loglayer/loglayer/packages/transports/google-cloud-logging/dist/index.cjs","../src/GoogleCloudLoggingTransport.ts"],"names":[],"mappings":"AAAA;ACEA,gDAAwC;AAYjC,IAAM,4BAAA,EAAN,MAAA,QAA0C,yBAAmB;AAAA,EAC1D;AAAA,EAER,WAAA,CAAY,MAAA,EAA2C;AACrD,IAAA,KAAA,CAAM,MAAM,CAAA;AACZ,IAAA,IAAA,CAAK,cAAA,EAAgB,MAAA,CAAO,cAAA,GAAiB,CAAC,CAAA;AAAA,EAChD;AAAA,EAEQ,WAAA,CAAY,KAAA,EAAyB;AAC3C,IAAA,OAAA,CAAQ,KAAA,EAAO;AAAA,MACb,KAAK,mBAAA,CAAS,KAAA;AACZ,QAAA,OAAO,UAAA;AAAA,MACT,KAAK,mBAAA,CAAS,KAAA;AACZ,QAAA,OAAO,OAAA;AAAA,MACT,KAAK,mBAAA,CAAS,IAAA;AACZ,QAAA,OAAO,SAAA;AAAA,MACT,KAAK,mBAAA,CAAS,IAAA;AACZ,QAAA,OAAO,MAAA;AAAA,MACT,KAAK,mBAAA,CAAS,KAAA;AACZ,QAAA,OAAO,OAAA;AAAA,MACT,KAAK,mBAAA,CAAS,KAAA;AACZ,QAAA,OAAO,OAAA;AAAA,MACT,OAAA;AACE,QAAA,OAAO,SAAA;AAAA,IACX;AAAA,EACF;AAAA,EAEA,YAAA,CAAa,EAAE,IAAA,EAAM,OAAA,EAAS,QAAA,EAAU,SAAS,CAAA,EAAmC;AAClF,IAAA,MAAM,MAAA,EAAQ,IAAA,CAAK,MAAA,CAAO,KAAA;AAAA,MACxB;AAAA,QACE,GAAG,IAAA,CAAK,aAAA;AAAA,QACR,QAAA,EAAU,IAAA,CAAK,WAAA,CAAY,QAAQ,CAAA;AAAA,QACnC,SAAA,kBAAW,IAAI,IAAA,CAAK;AAAA,MACtB,CAAA;AAAA,MACA;AAAA,QACE,GAAI,KAAA,GAAQ,QAAA,EAAU,KAAA,EAAO,CAAC,CAAA;AAAA,QAC9B,OAAA,EAAS,QAAA,CAAS,IAAA,CAAK,GAAG;AAAA,MAC5B;AAAA,IACF,CAAA;AAEA,IAAA,IAAA,CAAK,MAAA,CAAO,KAAA,CAAM,KAAK,CAAA;AAEvB,IAAA,GAAA,CAAI,KAAA,GAAQ,OAAA,EAAS;AACnB,MAAA,OAAO,CAAC,IAAA,EAAM,QAAQ,CAAA;AAAA,IACxB;AAEA,IAAA,OAAO,CAAC,QAAQ,CAAA;AAAA,EAClB;AACF,CAAA;ADjBA;AACE;AACF,kEAAC","file":"/home/runner/work/loglayer/loglayer/packages/transports/google-cloud-logging/dist/index.cjs","sourcesContent":[null,"import type { Log } from \"@google-cloud/logging\";\nimport type { LogEntry } from \"@google-cloud/logging/build/src/entry.js\";\nimport { BaseTransport, LogLevel } from \"@loglayer/transport\";\nimport type { LogLayerTransportConfig, LogLayerTransportParams } from \"@loglayer/transport\";\n\nexport interface GoogleCloudLoggingTransportConfig extends LogLayerTransportConfig<Log> {\n /**\n * The root level data to include for all log entries.\n * \"severity\", \"timestamp\" and \"jsonPayload\" are already populated by the transport.\n * @see https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry\n */\n rootLevelData?: Omit<LogEntry, \"severity\" | \"timestamp\" | \"jsonPayload\">;\n}\n\nexport class GoogleCloudLoggingTransport extends BaseTransport<Log> {\n private rootLevelData: Omit<LogEntry, \"severity\" | \"timestamp\" | \"jsonPayload\">;\n\n constructor(config: GoogleCloudLoggingTransportConfig) {\n super(config);\n this.rootLevelData = config.rootLevelData || {};\n }\n\n private mapLogLevel(level: LogLevel): string {\n switch (level) {\n case LogLevel.fatal:\n return \"CRITICAL\";\n case LogLevel.error:\n return \"ERROR\";\n case LogLevel.warn:\n return \"WARNING\";\n case LogLevel.info:\n return \"INFO\";\n case LogLevel.debug:\n return \"DEBUG\";\n case LogLevel.trace:\n return \"DEBUG\";\n default:\n return \"DEFAULT\";\n }\n }\n\n shipToLogger({ data, hasData, logLevel, messages }: LogLayerTransportParams): any[] {\n const entry = this.logger.entry(\n {\n ...this.rootLevelData,\n severity: this.mapLogLevel(logLevel),\n timestamp: new Date(),\n },\n {\n ...(data && hasData ? data : {}),\n message: messages.join(\" \"),\n },\n );\n\n this.logger.write(entry);\n\n if (data && hasData) {\n return [data, messages];\n }\n\n return [messages];\n }\n}\n"]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Log } from '@google-cloud/logging';
|
|
2
|
+
import { LogEntry } from '@google-cloud/logging/build/src/entry.js';
|
|
3
|
+
import { LogLayerTransportConfig, BaseTransport, LogLayerTransportParams } from '@loglayer/transport';
|
|
4
|
+
|
|
5
|
+
interface GoogleCloudLoggingTransportConfig extends LogLayerTransportConfig<Log> {
|
|
6
|
+
/**
|
|
7
|
+
* The root level data to include for all log entries.
|
|
8
|
+
* "severity", "timestamp" and "jsonPayload" are already populated by the transport.
|
|
9
|
+
* @see https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry
|
|
10
|
+
*/
|
|
11
|
+
rootLevelData?: Omit<LogEntry, "severity" | "timestamp" | "jsonPayload">;
|
|
12
|
+
}
|
|
13
|
+
declare class GoogleCloudLoggingTransport extends BaseTransport<Log> {
|
|
14
|
+
private rootLevelData;
|
|
15
|
+
constructor(config: GoogleCloudLoggingTransportConfig);
|
|
16
|
+
private mapLogLevel;
|
|
17
|
+
shipToLogger({ data, hasData, logLevel, messages }: LogLayerTransportParams): any[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { GoogleCloudLoggingTransport, type GoogleCloudLoggingTransportConfig };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Log } from '@google-cloud/logging';
|
|
2
|
+
import { LogEntry } from '@google-cloud/logging/build/src/entry.js';
|
|
3
|
+
import { LogLayerTransportConfig, BaseTransport, LogLayerTransportParams } from '@loglayer/transport';
|
|
4
|
+
|
|
5
|
+
interface GoogleCloudLoggingTransportConfig extends LogLayerTransportConfig<Log> {
|
|
6
|
+
/**
|
|
7
|
+
* The root level data to include for all log entries.
|
|
8
|
+
* "severity", "timestamp" and "jsonPayload" are already populated by the transport.
|
|
9
|
+
* @see https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry
|
|
10
|
+
*/
|
|
11
|
+
rootLevelData?: Omit<LogEntry, "severity" | "timestamp" | "jsonPayload">;
|
|
12
|
+
}
|
|
13
|
+
declare class GoogleCloudLoggingTransport extends BaseTransport<Log> {
|
|
14
|
+
private rootLevelData;
|
|
15
|
+
constructor(config: GoogleCloudLoggingTransportConfig);
|
|
16
|
+
private mapLogLevel;
|
|
17
|
+
shipToLogger({ data, hasData, logLevel, messages }: LogLayerTransportParams): any[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { GoogleCloudLoggingTransport, type GoogleCloudLoggingTransportConfig };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// src/GoogleCloudLoggingTransport.ts
|
|
2
|
+
import { BaseTransport, LogLevel } from "@loglayer/transport";
|
|
3
|
+
var GoogleCloudLoggingTransport = class extends BaseTransport {
|
|
4
|
+
rootLevelData;
|
|
5
|
+
constructor(config) {
|
|
6
|
+
super(config);
|
|
7
|
+
this.rootLevelData = config.rootLevelData || {};
|
|
8
|
+
}
|
|
9
|
+
mapLogLevel(level) {
|
|
10
|
+
switch (level) {
|
|
11
|
+
case LogLevel.fatal:
|
|
12
|
+
return "CRITICAL";
|
|
13
|
+
case LogLevel.error:
|
|
14
|
+
return "ERROR";
|
|
15
|
+
case LogLevel.warn:
|
|
16
|
+
return "WARNING";
|
|
17
|
+
case LogLevel.info:
|
|
18
|
+
return "INFO";
|
|
19
|
+
case LogLevel.debug:
|
|
20
|
+
return "DEBUG";
|
|
21
|
+
case LogLevel.trace:
|
|
22
|
+
return "DEBUG";
|
|
23
|
+
default:
|
|
24
|
+
return "DEFAULT";
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
shipToLogger({ data, hasData, logLevel, messages }) {
|
|
28
|
+
const entry = this.logger.entry(
|
|
29
|
+
{
|
|
30
|
+
...this.rootLevelData,
|
|
31
|
+
severity: this.mapLogLevel(logLevel),
|
|
32
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
...data && hasData ? data : {},
|
|
36
|
+
message: messages.join(" ")
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
this.logger.write(entry);
|
|
40
|
+
if (data && hasData) {
|
|
41
|
+
return [data, messages];
|
|
42
|
+
}
|
|
43
|
+
return [messages];
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
GoogleCloudLoggingTransport
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/GoogleCloudLoggingTransport.ts"],"sourcesContent":["import type { Log } from \"@google-cloud/logging\";\nimport type { LogEntry } from \"@google-cloud/logging/build/src/entry.js\";\nimport { BaseTransport, LogLevel } from \"@loglayer/transport\";\nimport type { LogLayerTransportConfig, LogLayerTransportParams } from \"@loglayer/transport\";\n\nexport interface GoogleCloudLoggingTransportConfig extends LogLayerTransportConfig<Log> {\n /**\n * The root level data to include for all log entries.\n * \"severity\", \"timestamp\" and \"jsonPayload\" are already populated by the transport.\n * @see https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry\n */\n rootLevelData?: Omit<LogEntry, \"severity\" | \"timestamp\" | \"jsonPayload\">;\n}\n\nexport class GoogleCloudLoggingTransport extends BaseTransport<Log> {\n private rootLevelData: Omit<LogEntry, \"severity\" | \"timestamp\" | \"jsonPayload\">;\n\n constructor(config: GoogleCloudLoggingTransportConfig) {\n super(config);\n this.rootLevelData = config.rootLevelData || {};\n }\n\n private mapLogLevel(level: LogLevel): string {\n switch (level) {\n case LogLevel.fatal:\n return \"CRITICAL\";\n case LogLevel.error:\n return \"ERROR\";\n case LogLevel.warn:\n return \"WARNING\";\n case LogLevel.info:\n return \"INFO\";\n case LogLevel.debug:\n return \"DEBUG\";\n case LogLevel.trace:\n return \"DEBUG\";\n default:\n return \"DEFAULT\";\n }\n }\n\n shipToLogger({ data, hasData, logLevel, messages }: LogLayerTransportParams): any[] {\n const entry = this.logger.entry(\n {\n ...this.rootLevelData,\n severity: this.mapLogLevel(logLevel),\n timestamp: new Date(),\n },\n {\n ...(data && hasData ? data : {}),\n message: messages.join(\" \"),\n },\n );\n\n this.logger.write(entry);\n\n if (data && hasData) {\n return [data, messages];\n }\n\n return [messages];\n }\n}\n"],"mappings":";AAEA,SAAS,eAAe,gBAAgB;AAYjC,IAAM,8BAAN,cAA0C,cAAmB;AAAA,EAC1D;AAAA,EAER,YAAY,QAA2C;AACrD,UAAM,MAAM;AACZ,SAAK,gBAAgB,OAAO,iBAAiB,CAAC;AAAA,EAChD;AAAA,EAEQ,YAAY,OAAyB;AAC3C,YAAQ,OAAO;AAAA,MACb,KAAK,SAAS;AACZ,eAAO;AAAA,MACT,KAAK,SAAS;AACZ,eAAO;AAAA,MACT,KAAK,SAAS;AACZ,eAAO;AAAA,MACT,KAAK,SAAS;AACZ,eAAO;AAAA,MACT,KAAK,SAAS;AACZ,eAAO;AAAA,MACT,KAAK,SAAS;AACZ,eAAO;AAAA,MACT;AACE,eAAO;AAAA,IACX;AAAA,EACF;AAAA,EAEA,aAAa,EAAE,MAAM,SAAS,UAAU,SAAS,GAAmC;AAClF,UAAM,QAAQ,KAAK,OAAO;AAAA,MACxB;AAAA,QACE,GAAG,KAAK;AAAA,QACR,UAAU,KAAK,YAAY,QAAQ;AAAA,QACnC,WAAW,oBAAI,KAAK;AAAA,MACtB;AAAA,MACA;AAAA,QACE,GAAI,QAAQ,UAAU,OAAO,CAAC;AAAA,QAC9B,SAAS,SAAS,KAAK,GAAG;AAAA,MAC5B;AAAA,IACF;AAEA,SAAK,OAAO,MAAM,KAAK;AAEvB,QAAI,QAAQ,SAAS;AACnB,aAAO,CAAC,MAAM,QAAQ;AAAA,IACxB;AAEA,WAAO,CAAC,QAAQ;AAAA,EAClB;AACF;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@loglayer/transport-google-cloud-logging",
|
|
3
|
+
"description": "Google Cloud Logging (Stackdriver) transport for loglayer.",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
"import": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"require": {
|
|
14
|
+
"types": "./dist/index.d.cts",
|
|
15
|
+
"require": "./dist/index.cjs"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"repository": "loglayer/loglayer.git",
|
|
21
|
+
"author": "Theo Gravity <theo@suteki.nu>",
|
|
22
|
+
"keywords": [
|
|
23
|
+
"logging",
|
|
24
|
+
"log",
|
|
25
|
+
"loglayer",
|
|
26
|
+
"stackdriver",
|
|
27
|
+
"google",
|
|
28
|
+
"cloud",
|
|
29
|
+
"transport"
|
|
30
|
+
],
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@loglayer/transport": "1.1.4"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"hash-runner": "2.0.1",
|
|
36
|
+
"@types/node": "22.10.4",
|
|
37
|
+
"serialize-error": "11.0.3",
|
|
38
|
+
"tsup": "8.3.5",
|
|
39
|
+
"typescript": "5.7.2",
|
|
40
|
+
"vitest": "2.1.8",
|
|
41
|
+
"tsx": "4.19.2",
|
|
42
|
+
"loglayer": "5.0.12",
|
|
43
|
+
"@internal/tsconfig": "1.0.0"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"@google-cloud/logging": "*"
|
|
47
|
+
},
|
|
48
|
+
"bugs": "https://github.com/loglayer/loglayer/issues",
|
|
49
|
+
"engines": {
|
|
50
|
+
"node": ">=18"
|
|
51
|
+
},
|
|
52
|
+
"files": [
|
|
53
|
+
"dist"
|
|
54
|
+
],
|
|
55
|
+
"homepage": "https://loglayer.dev",
|
|
56
|
+
"scripts": {
|
|
57
|
+
"build": "tsup src/index.ts",
|
|
58
|
+
"test": "vitest --run",
|
|
59
|
+
"build:dev": "hash-runner",
|
|
60
|
+
"clean": "rm -rf .turbo node_modules dist",
|
|
61
|
+
"lint": "biome check --write --unsafe src && biome format src --write && biome lint src --fix",
|
|
62
|
+
"verify-types": "tsc --noEmit",
|
|
63
|
+
"livetest": "tsx src/__tests__/livetest.ts"
|
|
64
|
+
}
|
|
65
|
+
}
|