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

daemon, cli: prepend timestamp for every log line #533

Closed
FeelyChau opened this issue Aug 29, 2020 · 5 comments
Closed

daemon, cli: prepend timestamp for every log line #533

FeelyChau opened this issue Aug 29, 2020 · 5 comments

Comments

@FeelyChau
Copy link
Collaborator

Now, the log from pipcook-cli is pure text without log time, it's not good to analyze problems.
If it could look like this, that would be great:

[18:12:23] ⚠ Building prefix dict from the default dictionary ...
[18:12:24] ⚠ Loading model from cache /var/folders/tq/cmmgdq_143jbd5w_drrdl8km0000gp/T/jieba.cache
[18:12:24] ⚠ Loading model cost 0.703 seconds.
[18:12:25] ⚠ Prefix dict has been built successfully.
[18:12:27] ℹ create a result "qy5nvaid" for plugin "@pipcook/plugins-bayesian-model-evaluate@1.1.0"
[18:12:30] ℹ [job] running modelEvaluate end
[18:13:00] ℹ [job] run successfully
[18:13:02] ✔ job is finished successfully
[18:13:04] ℹ start to download output to /Users/feiyu.zfy/work/pipcook/output
[18:13:10] ✔ download finished

We could extend the event interface to put the time stamp, after #526 , it's easy to implement, then we could add an option to the pipcook-cli command like pipcook run pipeline.json -t to show it (or default).

@yorkie
Copy link
Member

yorkie commented Aug 29, 2020

How do you prepend the timestamp?

@yorkie yorkie changed the title Log time is needed. cli: prepend timestamp for every log line Aug 29, 2020
@yorkie
Copy link
Member

yorkie commented Aug 29, 2020

I have opened a PR sindresorhus/ora#154, which adds a function option prefixText to prepend a custom string before every line.

BTW, updated the title, and please write your issue title to be more patient and follow the rule that I mentioned at #532 @FeelyChau.

@FeelyChau FeelyChau changed the title cli: prepend timestamp for every log line daemon, cli: prepend timestamp for every log line Aug 30, 2020
@FeelyChau
Copy link
Collaborator Author

FeelyChau commented Aug 30, 2020

I have opened a PR sindresorhus/ora#154, which adds a function option prefixText to prepend a custom string before every line.

BTW, updated the title, and please write your issue title to be more patient and follow the rule that I mentioned at #532 @FeelyChau.

It's not what I need, the time stamp should be stored in the disk, with log records and events. When we call the job.log, or plugin.installLog, the information of time is still here.

@yorkie
Copy link
Member

yorkie commented Sep 11, 2020

sindresorhus/ora#154 has been merged and ora@5.1.0 is released.

@FeelyChau
Copy link
Collaborator Author

Done by #848 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants