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

dapr list display the paths to the application and daprd logs in multi-app run #1228

Closed
Tracked by #1240
philliphoff opened this issue Feb 14, 2023 · 3 comments · Fixed by #1296
Closed
Tracked by #1240

dapr list display the paths to the application and daprd logs in multi-app run #1228

philliphoff opened this issue Feb 14, 2023 · 3 comments · Fixed by #1296
Assignees
Labels
area/cli good first issue Good for newcomers kind/enhancement enhancement to an existing feature kind/proposal A new proposal to be considered P1 size/XS 2 days work triaged/resolved The issue has been triaged
Milestone

Comments

@philliphoff
Copy link
Contributor

Describe the proposal

When using a run file (i.e. dapr run -f <file>), Dapr CLI redirects the application and Dapr logs of each application to its own file (under <appDirPath>/.dapr/logs). Subsequent runs will create new log files to ensure that developers can go back to previous logs for analysis, with each log filename containing a "timestamp" of its first creation. This is great but, after a while, these logs can accumulate and make it difficult for the the user to pick out the right log (e.g. the log that's currently being written to). Tooling can help, by automating the process of finding the "latest" logs and opening those (e.g. in the current editor). However, that automation (based on filenames) is not entirely certain; there will always be a chance some combination of files in the directory disrupts any filename timestamp sort.

Tooling is likely to care mostly about the logs being written to right now, and this is information that the Dapr CLI has. I propose that the Dapr CLI expose that information in the dapr list command. This will provide a more deterministic means to obtain the paths to application logs (and avoid having tooling care about Dapr log naming conventions).

For example:

[
  {
    "appId": "vscode-test",
    "httpPort": 64040,
    "grpcPort": 64041,
    "appPort": 3000,
    "metricsEnabled": true,
    "command": "node ./bin/www",
    "age": "7s",
    "created": "2023-01-30 10:32.27",
    "daprdPid": 18398,
    "cliPid": 18392,
    "commandPid": 18399,
    "maxRequestBodySize": -1,
    "httpReadBufferSize": -1,
    "runTemplatePath": "/Users/phoff/Source/scratch/vscode-test/dapr.yaml",
    # New path to the application log file
    "appLogPath": "/Users/phoff/Source/scratch/vscode-test/app-one/.dapr/logs/app-one_app_20230202160305.log", 
    # New path to the daprd log file
    "daprdLogPath": "/Users/phoff/Source/scratch/vscode-test/app-one/.dapr/logs/app-one_daprd_20230202160305.log" 
  }
]

Release Note

RELEASE NOTE:

@philliphoff philliphoff added the kind/proposal A new proposal to be considered label Feb 14, 2023
@mukundansundar mukundansundar added good first issue Good for newcomers area/cli P1 size/XS 2 days work triaged/resolved The issue has been triaged kind/enhancement enhancement to an existing feature labels Feb 15, 2023
@mukundansundar mukundansundar added this to the v1.11 milestone Feb 15, 2023
@mukundansundar mukundansundar modified the milestones: v1.11, v1.12 May 23, 2023
@shivam-51
Copy link
Contributor

Hi team, I am working on this!

@mukundansundar
Copy link
Collaborator

Hi team, I am working on this!

Please use /assign to assign this issue you yourself.

@shivam-51
Copy link
Contributor

/assign

@mukundansundar mukundansundar changed the title [Proposal] dapr run track and dapr list display the paths to the application and Dapr logs dapr list display the paths to the application and daprd logs in multi-app run Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli good first issue Good for newcomers kind/enhancement enhancement to an existing feature kind/proposal A new proposal to be considered P1 size/XS 2 days work triaged/resolved The issue has been triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants