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

Changing the format of the logs #379

Open
fersarr opened this issue Nov 3, 2022 · 2 comments
Open

Changing the format of the logs #379

fersarr opened this issue Nov 3, 2022 · 2 comments

Comments

@fersarr
Copy link

fersarr commented Nov 3, 2022

Hi! Thanks for this package! I was looking around and couldn't find a way to change the format of the logs but I thought you probably have a way to do that? For example, how can I remove the logstream name or the timestamp from the logs?

Example:

2022-11-03T16:01:04.010000+00:00 2022/11/03/[$LATEST]58asd312e7212131223124ae149 [INFO]    2022-11-03T16:01:04.010Z        70sadasbd-xxasaa9-5b70-a2ea-6860xasdasdas637ee5    Hey this is an actual log

I just want the part Hey this is an actual log

Thanks!

@tovask
Copy link

tovask commented Nov 22, 2022

Hi!
What is the exact command and arguments that you're trying?

As the help of the command shows, you can control some information in the output:

$ awslogs get --help
[...]
  -G, --no-group        Do not display group name
  -S, --no-stream       Do not display stream name
  --timestamp           Add creation timestamp to the output
  --ingestion-time      Add ingestion time to the output
[...]

Also, you can use a CloudWatch Logs Filter pattern.

@fersarr
Copy link
Author

fersarr commented Nov 22, 2022

Hi! Thanks for the help. I thank that will definitely improve it. I was looking for something like the usual --format "...." where you can specify everything, like the format of the date and everything else. But that will certainly help. Thanks!

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

No branches or pull requests

2 participants