Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankur Srivastava committed Aug 4, 2017
1 parent 5ee9636 commit a9a90df
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A simple python logger which writes logs to disk with some default configs.
Python 2.7 and 3.5

### Current stable version:
0.1.0
0.2.0

### Installation:

Expand Down Expand Up @@ -56,19 +56,20 @@ if __name__ == '__main__':
### Important arguments to `setup_logger` function:

```
log_directory:str directory to write log files to. Applicable only when `allow_file_logging` = True
file_handler_type: object of logging handler from HandlerType class. Applicable only when `allow_file_logging` = True
allow_console_logging:bool Turn off/on the console logging.
allow_file_logging:bool Turn off/on if logs need to go in files as well.
backup_count:int Number of files to backup before rotating the logs.
max_file_size_bytes:int Size of file in bytes before rotating the file. Applicable only to ROTATING_FILE_HANDLER.
when_to_rotate:str Duration after which a file can be rotated. Applicable only to TIME_ROTATING_FILE_HANDLER
Accepts following values:
'S' Seconds
'M' Minutes
'H' Hours
'D' Days
'W0'-'W6' Weekday (0=Monday)
'midnight' Roll over at midnight
change_log_level:dict A dictionary of handlers with corresponding log-level ( for eg. {'requests':'warning'} )
log_directory (str) :directory to write log files to. Applicable only when `allow_file_logging` = True
file_handler_type :object of logging handler from HandlerType class. Applicable only when `allow_file_logging` = True
allow_console_logging (bool) :Turn off/on the console logging.
allow_file_logging (bool) :Turn off/on if logs need to go in files as well.
backup_count (int) :Number of files to backup before rotating the logs.
max_file_size_bytes (int) :Size of file in bytes before rotating the file. Applicable only to ROTATING_FILE_HANDLER.
when_to_rotate (str) :Duration after which a file can be rotated. Applicable only to TIME_ROTATING_FILE_HANDLER
Accepts following values:
'S' Seconds
'M' Minutes
'H' Hours
'D' Days
'W0'-'W6' Weekday (0=Monday)
'midnight' Roll over at midnight
change_log_level (dict) :A dictionary of handlers with corresponding log-level ( for eg. {'requests':'warning'} )
gelf_handler :An external handler for graylog data publishing.
```

0 comments on commit a9a90df

Please sign in to comment.