Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove glog dependency #3652

Merged
merged 4 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove mentions of --logtostderr flag
  • Loading branch information
ash2k committed Oct 16, 2023
commit 01b4806d8291c40e00a6b727016fa79d2c0c571a
16 changes: 4 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ With `protoc` (just the grpc-gateway stubs):

```sh
protoc -I . --grpc-gateway_out ./gen/go \
--grpc-gateway_opt logtostderr=true \
--grpc-gateway_opt paths=source_relative \
--grpc-gateway_opt generate_unbound_methods=true \
your/service/v1/your_service.proto
Expand Down Expand Up @@ -300,7 +299,6 @@ Here's what a `protoc` execution might look like:

```sh
protoc -I . --grpc-gateway_out ./gen/go \
--grpc-gateway_opt logtostderr=true \
--grpc-gateway_opt paths=source_relative \
your/service/v1/your_service.proto
```
Expand Down Expand Up @@ -340,7 +338,6 @@ With `protoc` (just the grpc-gateway stubs):

```sh
protoc -I . --grpc-gateway_out ./gen/go \
--grpc-gateway_opt logtostderr=true \
--grpc-gateway_opt paths=source_relative \
--grpc-gateway_opt grpc_api_configuration=path/to/config.yaml \
--grpc-gateway_opt standalone=true \
Expand Down Expand Up @@ -438,7 +435,6 @@ With `protoc` (just the swagger file):

```sh
protoc -I . --openapiv2_out ./gen/openapiv2 \
--openapiv2_opt logtostderr=true \
your/service/v1/your_service.proto
```

Expand Down Expand Up @@ -531,19 +527,15 @@ through `protoc` using one of 2 patterns:
- as part of the `--<tool_suffix>_out` `protoc` parameter: `--<tool_suffix>_out=<flags>:<path>`

```sh
--grpc-gateway_out=logtostderr=true,repeated_path_param_separator=ssv:.
--openapiv2_out=logtostderr=true,repeated_path_param_separator=ssv:.
--grpc-gateway_out=repeated_path_param_separator=ssv:.
--openapiv2_out=repeated_path_param_separator=ssv:.
```

- using additional `--<tool_suffix>_opt` parameters: `--<tool_suffix>_opt=<flag>[,<flag>]*`

```sh
--grpc-gateway_opt logtostderr=true,repeated_path_param_separator=ssv
# or separately
--grpc-gateway_opt logtostderr=true --grpc-gateway_opt repeated_path_param_separator=ssv
--openapiv2_opt logtostderr=true,repeated_path_param_separator=ssv
# or separately
--openapiv2_opt logtostderr=true --openapiv2_opt repeated_path_param_separator=ssv
--grpc-gateway_opt repeated_path_param_separator=ssv
--openapiv2_opt repeated_path_param_separator=ssv
```

## More examples
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/development/installation_for_cygwin.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ Follow the [instructions](https://github.com/grpc-ecosystem/grpc-gateway#usage)
Adjust steps 3, 5 and 7 like this. `protoc` expects native Windows paths.

protoc -I. -I$(cygpath -w /usr/local/include) -I${GOPATH}/src --go_out=. --go-grpc_out=. ./path/to/your_service.proto
protoc -I. -I$(cygpath -w /usr/local/include) -I${GOPATH}/src --grpc-gateway_out=logtostderr=true:. ./path/to/your_service.proto
protoc -I. -I$(cygpath -w /usr/local/include) -I${GOPATH}/src --openapiv2_out=logtostderr=true:. ./path/to/your_service.proto
protoc -I. -I$(cygpath -w /usr/local/include) -I${GOPATH}/src ./path/to/your_service.proto
protoc -I. -I$(cygpath -w /usr/local/include) -I${GOPATH}/src ./path/to/your_service.proto

Then `cd` into the directory where your entry-point `main.go` file is located and run:

Expand Down
3 changes: 1 addition & 2 deletions docs/docs/mapping/customizing_openapi_output.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,8 @@ Example of a bash script with the `use_go_templates` flag set to true:
```sh
$ protoc -I. \
--go_out . --go-grpc_out . \
--grpc-gateway_out . --grpc-gateway_opt logtostderr=true \
--grpc-gateway_out . \
--openapiv2_out . \
--openapiv2_opt logtostderr=true \
--openapiv2_opt use_go_templates=true \
path/to/my/proto/v1/myproto.proto
```
Expand Down
2 changes: 0 additions & 2 deletions docs/docs/mapping/grpc_api_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ It will generate a stub file with path `./gen/go/your/service/v1/your_service.pb
```sh
protoc -I . \
--grpc-gateway_out ./gen/go \
--grpc-gateway_opt logtostderr=true \
--grpc-gateway_opt paths=source_relative \
--grpc-gateway_opt grpc_api_configuration=path/to/your_service.yaml \
your/service/v1/your_service.proto
Expand All @@ -107,7 +106,6 @@ It will generate a stub file with path `./gen/go/your/service/v1/your_service.pb
```
protoc -I . \
--grpc-gateway_out ./gen/go \
--grpc-gateway_opt logtostderr=true \
--grpc-gateway_opt paths=source_relative \
--grpc-gateway_opt standalone=true \
--grpc-gateway_opt grpc_api_configuration=path/to/your_service.yaml \
Expand Down
6 changes: 2 additions & 4 deletions examples/internal/browser/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,15 @@ gulp.task('gateway', shell.task([
]));

gulp.task('serve-server', ['server'], function () {
let server = child.spawn('bin/example-server', [
'--logtostderr',
], { stdio: 'inherit' });
let server = child.spawn('bin/example-server', [], { stdio: 'inherit' });
process.on('exit', function () {
server.kill();
});
});

gulp.task('serve-gateway', ['gateway', 'serve-server'], function () {
let gw = child.spawn('bin/example-gw', [
'--logtostderr', '--openapi_dir', path.join(__dirname, "../proto/examplepb"),
'--openapi_dir', path.join(__dirname, "../proto/examplepb"),
], { stdio: 'inherit' });
process.on('exit', function () {
gw.kill();
Expand Down
1 change: 0 additions & 1 deletion protoc-gen-grpc-gateway/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ go_binary(

go_proto_compiler(
name = "go_gen_grpc_gateway",
options = ["logtostderr=true"],
plugin = ":protoc-gen-grpc-gateway",
suffix = ".pb.gw.go",
visibility = ["//visibility:public"],
Expand Down
2 changes: 0 additions & 2 deletions protoc-gen-openapiv2/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ def _run_proto_gen_openapi(

args.add("--plugin", "protoc-gen-openapiv2=%s" % protoc_gen_openapiv2.path)

args.add("--openapiv2_opt", "logtostderr=true")

extra_inputs = []
if grpc_api_configuration:
extra_inputs.append(grpc_api_configuration)
Expand Down