Skip to main content

an easy logger outputs like java logs

Project description

loggerjava


an easy logger outputs like java logs

How to use

import loggerjava
logger = loggerjava
logger.info("test")
logger.warn("test",pos="insidecommand")

Outputs

[20:39:00] [main/debug]: test
[20:39:00] [main/info]: test
[20:39:00] [main/WARNING]: test
[20:39:00] [main/ERROR]: test
[20:39:00] [main/FATAL]: test

Developing features

  • mutiple variable with different configs
  • new config format
  • catch and format errors
  • override config once

Config

import loggerjava
loggerjava.config(**kwargs)
"""
:param kwargs:input config names and config data
format: config_name = config_data

below are config_name and the description

name : change the name of the log file, only actives when abolutepath config is off

filetype : change the file type of the log file, only actives when abolutepath config is off

absolutepath : change whether inputing the absolute path of the log file,
True for using the name and filetype to create file in the program running location
False for using the route to create file in the specific location(note:you need to enter the file format,like:test.log)

route : change the file location, only activates when abolutepath config is on

file_encoding : change the file encoding method

showdetailedtime : whether to show detailed time in the log file

showinconsole : whether to show the log in the python console

fatalexit : whether to exit the program after a fatal log

:return:
"""

using logger.exportconfig() to export your current config

and using logger.inportconfig(inputconfig) to inport your config

Versions

v0.0.7.5 edited the original log codes,adding "log" feature,add the fatalexit config

v0.0.7.2 adding the "fatalexit" feature,adding an easier log function(not completed)

v0.0.7.1 adding debug config,adding debug

v0.0.7 no actual updates, updating version num to ver x.x.x

0.0.6.1 update readme

0.0.6 change the config method, adding file_encoding,absolutepath,filetype config

0.0.5.1 rename outputconfig -> exportconfig

0.0.5 added the outputconfig and the loadconfig function,edited the config part to let it output log

0.0.4 upgrade the config sys and add helps

0.0.3 upload the descriptions

0.0.2 initial upload

Project details


Download files

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

Source Distribution

loggerjava-0.0.7.5.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

loggerjava-0.0.7.5-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file loggerjava-0.0.7.5.tar.gz.

File metadata

  • Download URL: loggerjava-0.0.7.5.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for loggerjava-0.0.7.5.tar.gz
Algorithm Hash digest
SHA256 da12db2e02fdbd750ce516029fc86176741d75fc6ca6d9defa9e200880f8c91d
MD5 84b2f3189b7b0831bc82c382d613dbd9
BLAKE2b-256 df1950f4b100b58b793c788a2059bbee22da2d981369e6d2440ca01cfff0a518

See more details on using hashes here.

File details

Details for the file loggerjava-0.0.7.5-py3-none-any.whl.

File metadata

File hashes

Hashes for loggerjava-0.0.7.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ba94e48d18a2f358c9c8deaeeb8bdac6c5781b4ca769a2b20121551c438007db
MD5 710a242a9b30d25a26d7fbdce0a1295f
BLAKE2b-256 9a7a83a39d0820f094398c004c697be1f18a74f2d8f0401bc726a9a234fb276a

See more details on using hashes here.

Supported by

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