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

multiple log levels in output panel #6633

Closed
wanlwanl opened this issue Mar 24, 2025 · 4 comments
Closed

multiple log levels in output panel #6633

wanlwanl opened this issue Mar 24, 2025 · 4 comments
Assignees
Labels
ide Issues for VS, VSCode, Monaco, etc.

Comments

@wanlwanl
Copy link
Member

emit .net server

  1. multiple log level here
2025-03-24 17:19:10.173 [error] [Warn]: Enum 'TodoItemStatus' must have either a summary or doc
2025-03-24 17:19:10.174 [error] [Warn]: Enum 'TodoItemPatchStatus' must have either a summary or doc
@wanlwanl wanlwanl added the ide Issues for VS, VSCode, Monaco, etc. label Mar 24, 2025
@RodgeFu
Copy link
Contributor

RodgeFu commented Mar 24, 2025

@chunyu3 , the output doesn't look like diagnostic, could you help to check how they are logged and why they are going through stderr channel? thanks.

@chunyu3 chunyu3 self-assigned this Mar 25, 2025
@chunyu3
Copy link
Contributor

chunyu3 commented Mar 25, 2025

Hello @wanlwanl Have you enabled trace for csharp-server-emitter? This is log from csharp-server-emitter, and all the emitter log is trace log.

And it is not multiple log levels, [Warn] is not a log level, it is a text in the log message, the server-emitter log a message like [Warn]: Enum 'TodoItemStatus' must have either a summary or doc

@RodgeFu and if it is a trace log, tsp/complier will send it to stderr now

@wanlwanl
Copy link
Member Author

Hi @chunyu3, this is the tspconfig.yaml I used:

emit:
  - "@typespec/openapi3"
  - "@typespec/http-server-csharp"
  - "@typespec/http-client-csharp"
  - "@typespec/http-client-java"
  #  - "@typespec/http-server-javascript" # js server gen throws error: Error: Unimplemented: new form of multipart requests
  - "@typespec/http-client-python"
  - "@azure-tools/typespec-ts"
options:
  "@typespec/openapi3":
    emitter-output-dir: "{project-root}/../x/openapi3"
  "@typespec/http-client-csharp":
    emitter-output-dir: "{project-root}/../x/clients/dotnet"
  "@typespec/http-server-csharp":
    emitter-output-dir: "{project-root}/../x/servers/aspnet/generated"
  "@typespec/http-server-javascript":
    emitter-output-dir: "{project-root}/../x/servers/node/tsp-output/@typespec/http\
      -server-javascript"
    express: true
  "@typespec/http-client-java":
    emitter-output-dir: "{project-root}/../x/clients/java"
  "@typespec/http-client-python":
    emitter-output-dir: "{project-root}/../x/clients/python"
  "@azure-tools/typespec-ts":
    "emitter-output-dir": "{project-root}/../x/clients/javascript"
    packageDetails:
      name: "@notabrand/todo-non-branded"

@chunyu3
Copy link
Contributor

chunyu3 commented Mar 26, 2025

This log is logged from http-client-csharp, (not http-server-csharp), and it is logged by older http-client-csharp version.
In latest http-client-csharp version, all the logs from emitter will be trace. And this log does not exist.

close this issue.

@chunyu3 chunyu3 closed this as completed Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ide Issues for VS, VSCode, Monaco, etc.
Projects
None yet
Development

No branches or pull requests

3 participants