awsputlogs

command module
v0.0.0-...-b787193 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2021 License: MIT Imports: 12 Imported by: 0

README

awsputlogs

awsputlogs is tool to upload JSON and string logs to the AWS CloudWatch Logs easily.

Usage

Upload log events

$ awsputlogs --log-group <LOG GROUP NAME> "sample log message1" "sample log message2"

Upload log events to specified log stream

$ awsputlogs --log-group <LOG GROUP NAME> --log-stream <LOG STREAM NAME> "sample log message1"

You should use '--logs-file' option if you want to upload JSON logs or many logs.

$ awsputlogs --log-group <LOG GROUP NAME> --logs-file <FILE PATH>

You must write a file with the following formats.

Upload JSON logs

[
    {
        "level": "info",
        "message": "Start Server"
    },
    {
        "level": "error",
        "message": "Failed to Start Server"
    }
]

Upload string logs

[
    "[INFO] Start Server",
    "[ERROR] Failed to Start Server"
]

Upload JSON and string logs

[
    {
        "level": "info",
        "message": "Start Server"
    },
    "[ERROR] Failed to Start Server"
]

LICENCE

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL