Skip to main content

### Project description

Dailylog is a utility for recording daily logs on your own word.

You can easily master its usage through this document.

### Why should I use dailylog?

The goal of dailylog is to provide a simple way to create daily-log files. In the build-in modules logging, which has to config the date and log format, besides, if you want to devide the logs by day, you will need to create a TimedRotatingFileHandler.

But in the dailylog, we provide a simply way to handle the log files, you can flexibly record what you want, avoiding to take some unimportant information, such as trackback, warning from the django, and so on. Also, the module can automatically make daily-log files.

### Installation

$pip install dailylog

nowadays we only provide linux wheel, if you are using Windows platform, you can download the source file and run the following command:

$python setup.py install

### Using dailylog

  1. import the module and create a filehandler:

` import dailylog file_handler = dailylog.LogHandler() `

we provide three parameters for LogHandler:

  • date_format: as named, default is “%Y-%m-%d–%H:%M:%S”

  • log_dir: target folder to save the log files, default is “./logs/”. if the folder does not exist, the system will create it automatically.

  • print_symbol: whether to print the message on the terminal. Default is True

  1. make different logs:

`angular2html file_handler.debug(some message) file_handler.info(some message) file_handler.warning(some message) file_handler.error(some message) `

  1. show different logs:

`angular2html file_handler.show_debug(date) file_handler.show_info(date) file_handler.show_warning(date) file_handler.show_error(date) `

While will show the corresponding message of the date. The default date is time.strftime(‘%Y-%m-%d’, time.localtime(time.time()))

which means today.

### Github

https://github.com/darkwhale/day_log

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dailylog-0.0.3.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dailylog-0.0.3-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file dailylog-0.0.3.tar.gz.

File metadata

  • Download URL: dailylog-0.0.3.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for dailylog-0.0.3.tar.gz
Algorithm Hash digest
SHA256 336acda21035d1acc45fdce82a650efa55686fe5de38557553893ba3ad175c4a
MD5 2aa578f468767eea0a76620596c0b36b
BLAKE2b-256 eaed7b68c944021e82e9f4294338c6030b98f737f1dc72a97511ed4e1a397e49

See more details on using hashes here.

File details

Details for the file dailylog-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: dailylog-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for dailylog-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ea97710b0889d3a509a15c5060243f7a734bf570bcb8a19363886d3758fafcd9
MD5 0565391d796d6b18660f30d5c1dbe074
BLAKE2b-256 cfba2b4e86eeaf358f48c8bdaed6fb346ea7f52074b705d82dee4f113fb2d1c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page