Skip to content

Commit

Permalink
Add a deprecation message when running "serverless logs" command (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
norbjd authored Feb 14, 2024
1 parent e98bd14 commit ae9eb59
Show file tree
Hide file tree
Showing 17 changed files with 30 additions and 15 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.4.10

### Changed

- Display a deprecation warning when running `serverless logs` command #212

## 0.4.9

### Fixed
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion examples/container-schedule/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "ISC",
"dependencies": {},
"devDependencies": {
"serverless-scaleway-functions": ">=0.4.9"
"serverless-scaleway-functions": ">=0.4.10"
},
"description": ""
}
2 changes: 1 addition & 1 deletion examples/container/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "ISC",
"dependencies": {},
"devDependencies": {
"serverless-scaleway-functions": ">=0.4.9"
"serverless-scaleway-functions": ">=0.4.10"
},
"description": ""
}
2 changes: 1 addition & 1 deletion examples/go/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"license": "ISC",
"dependencies": {},
"devDependencies": {
"serverless-scaleway-functions": ">=0.4.9"
"serverless-scaleway-functions": ">=0.4.10"
},
"description": ""
}
2 changes: 1 addition & 1 deletion examples/multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "ISC",
"dependencies": {},
"devDependencies": {
"serverless-scaleway-functions": ">=0.4.9"
"serverless-scaleway-functions": ">=0.4.10"
},
"description": ""
}
2 changes: 1 addition & 1 deletion examples/nodejs-es-modules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": ""
}
2 changes: 1 addition & 1 deletion examples/nodejs-schedule/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": ""
}
2 changes: 1 addition & 1 deletion examples/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": ""
}
2 changes: 1 addition & 1 deletion examples/php/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "ISC",
"dependencies": {},
"devDependencies": {
"serverless-scaleway-functions": ">=0.4.9"
"serverless-scaleway-functions": ">=0.4.10"
},
"description": ""
}
2 changes: 1 addition & 1 deletion examples/python3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "ISC",
"dependencies": {},
"devDependencies": {
"serverless-scaleway-functions": ">=0.4.9"
"serverless-scaleway-functions": ">=0.4.10"
},
"description": ""
}
2 changes: 1 addition & 1 deletion examples/rust/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"license": "ISC",
"dependencies": {},
"devDependencies": {
"serverless-scaleway-functions": ">=0.4.9"
"serverless-scaleway-functions": ">=0.4.10"
},
"description": ""
}
2 changes: 1 addition & 1 deletion examples/secrets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "ISC",
"dependencies": {},
"devDependencies": {
"serverless-scaleway-functions": ">=0.4.9"
"serverless-scaleway-functions": ">=0.4.10"
},
"description": ""
}
2 changes: 1 addition & 1 deletion examples/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
5 changes: 5 additions & 0 deletions logs/lib/getLogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit ae9eb59

Please sign in to comment.