meteor-up icon indicating copy to clipboard operation
meteor-up copied to clipboard

Improve logs

Open zodern opened this issue 8 years ago • 10 comments

  • [ ] Keep old logs after deploying new version (it currently loses all old logs since the old container is removed)
  • [ ] Insert events into logs such as deployments, crashes, restarts
  • [ ] Add --timestamps to cli help for log commands
  • [ ] Create reusable command builder for log commands
  • [ ] Text coloring
  • [ ] support color control codes

zodern avatar Oct 12 '17 02:10 zodern

Timestamps on logs would be really crucial for us.

houshuang avatar Oct 19 '17 05:10 houshuang

@houshuang you can use the --timestamps option now when viewing logs. It is only missing from the cli help.

zodern avatar Oct 19 '17 12:10 zodern

Great, very useful, thanks!

On Thu, Oct 19, 2017 at 2:50 PM, zodern [email protected] wrote:

@houshuang https://github.com/houshuang you can use the --timestamps option now when viewing logs. It is only missing from the cli help.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zodern/meteor-up/issues/762#issuecomment-337897375, or mute the thread https://github.com/notifications/unsubscribe-auth/AADwh5ZYry04zqW5w4amE3ibbUHT8SPVks5st0WdgaJpZM4P2Yxr .

-- http://reganmian.net/blog -- Random Stuff that Matters

houshuang avatar Oct 19 '17 13:10 houshuang

Text coloring would be nice to have back too. This used to work in version 1.03 and earlier

gjr-qm avatar Oct 19 '17 16:10 gjr-qm

@gjr-qm Thanks. I added it to the list.

zodern avatar Oct 20 '17 00:10 zodern

Hi, is there a command or documentation somewhere to:

  1. Clear server logs
  2. Store the output of server logs to a file

yongyi520 avatar Oct 26 '17 06:10 yongyi520

You can customize the log driver in meteor.log. Why do you want to clear the logs or store it in a file?

zodern avatar Oct 26 '17 23:10 zodern

Hi zodern

Recently, I had a very very long server log (when i type in mup logs -f, it took me 5 minutes to let it generate all the logs from the beginning). I had to scroll for a very long time to find out where the problem was.

I want to clear logs because I want to remove the part of the console log that are working correctly.

I want to store it in a file to treat it as back up... in case if logs contains valuable information that I overlooked when I clear the console log.

Perhaps the logs can be displayed via 'syslog-address' within the configuration. I am having trouble understand and learning how to use that. Is there extra resources (examples) where I can find?

yongyi520 avatar Oct 27 '17 17:10 yongyi520

@yongyi520 check out papertrail.com . You can hook it up with Winston. It has a free tier

thebarty avatar Dec 01 '17 09:12 thebarty

hooks: { 'pre.deploy': { localCommand: 'mup logs -t | aws s3 cp - "s3://sidekick-development-server-logs/$(date +%Y-%m-%d_%H-%M-%S)_log_dump.txt" --profile sidekick-development-deployments' }}

I dunno if this helps anyone but to get around the issue for now I've utilized the hooks functionality to send the logs to AWS S3 before the deploy wipes the logs.

Obviously this example has things not super relevant to other projects like using the awscli and certain AWS IAM roles etc....but the concept of piping the output of mup logs -t | like so is the point. You could pipe the logs to any script or process which can store them somewhere 'pre.deploy'

wallind avatar Feb 08 '21 20:02 wallind