Skip to content

Conversation

@raph-luc
Copy link
Member

@raph-luc raph-luc commented Jul 20, 2023

Minor suggestion to have debug logs that are much easier to work with, and not overwhelmed by gRPC calls that pass millions of characters or with multiple line breaks each time. Partially addresses #1800 from the logging point of view (but I don't know if passing such gigantic gRPC calls so often is intentional or desired).

Before

image

Fluent root settings API call

2023-07-19 16:39:20,210 pyfluent.networking   DEBUG    GRPC_TRACE: rpc = /ansys.api.fluent.v0.settings.Settings/GetStaticInfo, request = {'root': 'fluent'}
2023-07-19 16:39:22,301 pyfluent.networking   DEBUG    GRPC_TRACE: response = {'info': ... <2.2 MILLION CHARACTERS> ... }

TUI call

2023-07-19 16:39:10,286 pyfluent.tui          DEBUG    TUI Command: path: "/file/read_case"
args {
  fields {
    key: "tui_args"
    value {
      list_value {
        values {
          string_value: "ablation.msh.h5"
        }
      }
    }
  }
}

2023-07-19 16:39:10,287 pyfluent.networking   DEBUG    GRPC_TRACE: rpc = /ansys.api.fluent.v0.DataModel/ExecuteCommand, request = {'path': '/file/read_case', 'args': {'tui_args': ['ablation.msh.h5']}}
2023-07-19 16:39:20,164 pyfluent.networking   DEBUG    GRPC_TRACE: response = {}

After

image

Fluent root settings API call

2023-07-20 12:34:31,332 pyfluent.networking   DEBUG    GRPC_TRACE: rpc = /ansys.api.fluent.v0.settings.Settings/GetStaticInfo, request = {'root': 'fluent'}
2023-07-20 12:34:32,882 pyfluent.networking   DEBUG    GRPC_TRACE: response hidden, 2221700 bytes > 1000 bytes limit.

TUI call

2023-07-20 12:34:21,939 pyfluent.tui          DEBUG    TUI Command: path: "/file/read_case" args { fields { key: "tui_args" value { list_value { values { string_value: "ablation.msh.h5" } } } } }
2023-07-20 12:34:21,941 pyfluent.networking   DEBUG    GRPC_TRACE: rpc = /ansys.api.fluent.v0.DataModel/ExecuteCommand, request = {'path': '/file/read_case', 'args': {'tui_args': ['ablation.msh.h5']}}
2023-07-20 12:34:31,304 pyfluent.networking   DEBUG    GRPC_TRACE: response = {}

@raph-luc raph-luc marked this pull request as ready for review July 20, 2023 16:55
@raph-luc raph-luc merged commit 4d76f1c into main Jul 21, 2023
@raph-luc raph-luc deleted the fix/grpc_tui_logging branch July 21, 2023 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recent Fluent v241 has new behavior at launch, breaking PyFluent Docker container launches

5 participants