log into a file and push it to aws s3
Project description
# awsLogger
AwsLogger is a simple logging utility.
It allow you to log all type of data ( string, numbers, list, dictionaries or even custom objects ) into a file and push it to amazon s3.
## Installation
```
pip install awsLogger
```
## How to use
First import awsLogger:
```
import awsLogger
```
To log on your local machine:
```
awsLogger.log("this will be added to your log file", config)
```
To push current file to amazon s3:
```
awsLogger.push(config)
```
To log on your local machine and push to amazon s3:
```
awsLogger.logAndPush("this will be added to your log file and pushed to aws", config)
```
## How to configure
```
config = {
"awsId":<Your aws api id>,
"awsSecret":<Your aws api secret key>,
"projectId":<Identifier, if bucket name is not specifed, it will be used as bucket name, it will be used to generate a log file name if no log file name is specified>,
"bucketName":<The s3 bucket where to put the log file>,
"bucketPathFromRoot":<path on s3 bucket>
"fileName":"logfile name"
"filePath":"local file path"
}
```
All configuration entries are optional. if no awsId and no awsSecret are given, it will use your system default.
AwsLogger is a simple logging utility.
It allow you to log all type of data ( string, numbers, list, dictionaries or even custom objects ) into a file and push it to amazon s3.
## Installation
```
pip install awsLogger
```
## How to use
First import awsLogger:
```
import awsLogger
```
To log on your local machine:
```
awsLogger.log("this will be added to your log file", config)
```
To push current file to amazon s3:
```
awsLogger.push(config)
```
To log on your local machine and push to amazon s3:
```
awsLogger.logAndPush("this will be added to your log file and pushed to aws", config)
```
## How to configure
```
config = {
"awsId":<Your aws api id>,
"awsSecret":<Your aws api secret key>,
"projectId":<Identifier, if bucket name is not specifed, it will be used as bucket name, it will be used to generate a log file name if no log file name is specified>,
"bucketName":<The s3 bucket where to put the log file>,
"bucketPathFromRoot":<path on s3 bucket>
"fileName":"logfile name"
"filePath":"local file path"
}
```
All configuration entries are optional. if no awsId and no awsSecret are given, it will use your system default.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
awsLogger-0.0.9.tar.gz
(3.2 kB
view details)
Built Distribution
File details
Details for the file awsLogger-0.0.9.tar.gz
.
File metadata
- Download URL: awsLogger-0.0.9.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ee6411c52c9ef4fb1b3b68dd39a21743694701b9c1f013000d75a5a9718b749 |
|
MD5 | a3c5f99785c9a6a8a118895d7a69a71e |
|
BLAKE2b-256 | ac3fee26c3faaefd19fbac20387da6315bf563edfa958c87d10f89d64a83887f |
File details
Details for the file awsLogger-0.0.9-py3-none-any.whl
.
File metadata
- Download URL: awsLogger-0.0.9-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7694575dc73e449dec0572f00a9b445a9d6201e7ce4d0072acc27401491b671 |
|
MD5 | 29a4c6d6bb0f50a6d753765b22ce1656 |
|
BLAKE2b-256 | ddac36c5414a339b988a9f8e6034a0d19055f986c8e50b40f9ad557d3bcbb42b |