From ae9eb5981fdd046890a35a38cbd9d49013707eee Mon Sep 17 00:00:00 2001 From: norbjd Date: Wed, 14 Feb 2024 14:34:37 +0100 Subject: [PATCH] Add a deprecation message when running "serverless logs" command (#212) --- CHANGELOG.md | 6 ++++++ README.md | 4 ++++ examples/container-schedule/package.json | 2 +- examples/container/package.json | 2 +- examples/go/package.json | 2 +- examples/multiple/package.json | 2 +- examples/nodejs-es-modules/package.json | 2 +- examples/nodejs-schedule/package.json | 2 +- examples/nodejs/package.json | 2 +- examples/php/package.json | 2 +- examples/python3/package.json | 2 +- examples/rust/package.json | 2 +- examples/secrets/package.json | 2 +- examples/typescript/package.json | 2 +- logs/lib/getLogs.js | 5 +++++ package-lock.json | 4 ++-- package.json | 2 +- 17 files changed, 30 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 841151a..519096a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 0.4.10 + +### Changed + +- Display a deprecation warning when running `serverless logs` command #212 + ## 0.4.9 ### Fixed diff --git a/README.md b/README.md index 6c93a46..206688c 100644 --- a/README.md +++ b/README.md @@ -251,6 +251,10 @@ This can be switched off by setting the `singleSource` option to `false`. ### `serverless logs` +> [!WARNING] +> This command is deprecated and will be removed on March 12, 2024. Please refer to the documentation (for [functions](https://www.scaleway.com/en/developers/api/serverless-functions/#logs) and [containers](https://www.scaleway.com/en/developers/api/serverless-functions/#logs)) to continue getting your logs. +> TL;DR: You can still access function and container logs conveniently via the [Cockpit](https://www.scaleway.com/en/docs/observability/cockpit/how-to/access-grafana-and-managed-dashboards/) interface. Dedicated dashboards called "Serverless Functions Logs" and "Serverless Containers Logs" are accessible there. + The `serverless logs` command lets you watch the logs of a specific function or container. You can fetch the logs of a specific function for with the `--function` option. You must specify the name of your function in the command. diff --git a/examples/container-schedule/package.json b/examples/container-schedule/package.json index bded11a..9930da1 100644 --- a/examples/container-schedule/package.json +++ b/examples/container-schedule/package.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": {}, "devDependencies": { - "serverless-scaleway-functions": ">=0.4.9" + "serverless-scaleway-functions": ">=0.4.10" }, "description": "" } diff --git a/examples/container/package.json b/examples/container/package.json index b38eaf2..0dab4bf 100644 --- a/examples/container/package.json +++ b/examples/container/package.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": {}, "devDependencies": { - "serverless-scaleway-functions": ">=0.4.9" + "serverless-scaleway-functions": ">=0.4.10" }, "description": "" } diff --git a/examples/go/package.json b/examples/go/package.json index b6a205b..5364d69 100644 --- a/examples/go/package.json +++ b/examples/go/package.json @@ -9,7 +9,7 @@ "license": "ISC", "dependencies": {}, "devDependencies": { - "serverless-scaleway-functions": ">=0.4.9" + "serverless-scaleway-functions": ">=0.4.10" }, "description": "" } diff --git a/examples/multiple/package.json b/examples/multiple/package.json index 143e9a6..3ac662c 100644 --- a/examples/multiple/package.json +++ b/examples/multiple/package.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": {}, "devDependencies": { - "serverless-scaleway-functions": ">=0.4.9" + "serverless-scaleway-functions": ">=0.4.10" }, "description": "" } diff --git a/examples/nodejs-es-modules/package.json b/examples/nodejs-es-modules/package.json index a84ecb2..d053a7d 100644 --- a/examples/nodejs-es-modules/package.json +++ b/examples/nodejs-es-modules/package.json @@ -11,7 +11,7 @@ "license": "ISC", "devDependencies": { "@scaleway/serverless-functions": "^1.0.2", - "serverless-scaleway-functions": ">=0.4.9" + "serverless-scaleway-functions": ">=0.4.10" }, "description": "" } diff --git a/examples/nodejs-schedule/package.json b/examples/nodejs-schedule/package.json index 638fcf7..c64dcba 100644 --- a/examples/nodejs-schedule/package.json +++ b/examples/nodejs-schedule/package.json @@ -10,7 +10,7 @@ "license": "ISC", "devDependencies": { "@scaleway/serverless-functions": "^1.0.2", - "serverless-scaleway-functions": ">=0.4.9" + "serverless-scaleway-functions": ">=0.4.10" }, "description": "" } diff --git a/examples/nodejs/package.json b/examples/nodejs/package.json index ee6b516..a6d986e 100644 --- a/examples/nodejs/package.json +++ b/examples/nodejs/package.json @@ -10,7 +10,7 @@ "license": "ISC", "devDependencies": { "@scaleway/serverless-functions": "^1.0.2", - "serverless-scaleway-functions": ">=0.4.9" + "serverless-scaleway-functions": ">=0.4.10" }, "description": "" } diff --git a/examples/php/package.json b/examples/php/package.json index 762ca87..2f0373a 100644 --- a/examples/php/package.json +++ b/examples/php/package.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": {}, "devDependencies": { - "serverless-scaleway-functions": ">=0.4.9" + "serverless-scaleway-functions": ">=0.4.10" }, "description": "" } diff --git a/examples/python3/package.json b/examples/python3/package.json index fa422e9..a24bf18 100644 --- a/examples/python3/package.json +++ b/examples/python3/package.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": {}, "devDependencies": { - "serverless-scaleway-functions": ">=0.4.9" + "serverless-scaleway-functions": ">=0.4.10" }, "description": "" } diff --git a/examples/rust/package.json b/examples/rust/package.json index b63e35f..cbfea5e 100644 --- a/examples/rust/package.json +++ b/examples/rust/package.json @@ -9,7 +9,7 @@ "license": "ISC", "dependencies": {}, "devDependencies": { - "serverless-scaleway-functions": ">=0.4.9" + "serverless-scaleway-functions": ">=0.4.10" }, "description": "" } diff --git a/examples/secrets/package.json b/examples/secrets/package.json index 12d4a78..587b242 100644 --- a/examples/secrets/package.json +++ b/examples/secrets/package.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": {}, "devDependencies": { - "serverless-scaleway-functions": ">=0.4.9" + "serverless-scaleway-functions": ">=0.4.10" }, "description": "" } diff --git a/examples/typescript/package.json b/examples/typescript/package.json index 67644c9..a7cc066 100644 --- a/examples/typescript/package.json +++ b/examples/typescript/package.json @@ -12,7 +12,7 @@ "devDependencies": { "@types/node": "^18.15.11", "@scaleway/serverless-functions": ">=1.0.2", - "serverless-scaleway-functions": ">=0.4.9", + "serverless-scaleway-functions": ">=0.4.10", "typescript": "^5.0.2" } } diff --git a/logs/lib/getLogs.js b/logs/lib/getLogs.js index 69eed4e..cd51092 100644 --- a/logs/lib/getLogs.js +++ b/logs/lib/getLogs.js @@ -35,6 +35,11 @@ module.exports = { }, printLines(logs) { + this.serverless.cli.log( + '----\n⚠️ WARNING: "serverless logs" command is deprecated and will be removed on March 12, 2024. ' + + "Please use Cockpit as soon as possible to continue browsing your logs. " + + "Refer to our documentation here: https://www.scaleway.com/en/developers/api/serverless-containers/#logs.\n----" + ); for (let i = logs.length - 1; i >= 0; i -= 1) { this.serverless.cli.log(logs[i].message); } diff --git a/package-lock.json b/package-lock.json index f563991..017cf97 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "serverless-scaleway-functions", - "version": "0.4.9", + "version": "0.4.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "serverless-scaleway-functions", - "version": "0.4.9", + "version": "0.4.10", "license": "MIT", "dependencies": { "@serverless/utils": "^6.13.1", diff --git a/package.json b/package.json index 0f9b5d6..757711b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "serverless-scaleway-functions", - "version": "0.4.9", + "version": "0.4.10", "description": "Provider plugin for the Serverless Framework v1.x which adds support for Scaleway Functions.", "main": "index.js", "author": "scaleway.com",