A simple, one-line utility for instant professional logging.
Project description
Copyright 2025 UsamaAliceWhite All Rights Reserved
ロギング機能
説明
本機能はアプリ全体で一つの設定を共有する。 その為、最初にGetLoggerを呼び出した際の設定が、アプリ終了時まで全てのロガーに適応される。
開発目的は「簡単にログを出力できる」事である。
推奨される引数はログファイルの保存先の「log_file_path」とロガー名の「logger_name」である。 引数の初期値は「毎日00時00分に新しいログファイルを作成する。過去のログファイルは最大99ファイルまで保管される。」である。
関数と引数
GetLogger() log_file_path 概要:ログファイルの保存先 型:パス、文字列 初期値:ユーザホームディレクトリ/Unknown.log log_when 概要:ログファイルを新しいファイルに切り替えるタイミング 型:文字列 初期値:00時00分 log_interval 概要:ログファイルを新しいファイルに切り替える頻度 型:整数 初期値:毎回 log_backup_count 概要:保存する過去のログファイルの最大数 型:整数 初期値:最大99ファイル log_encoding 概要:ログファイルの文字コード 型:文字列 初期値:UTF-8 log_level 概要:ログハンドラーの出力レベル 型:整数 初期値:全て出力 log_text_format 概要:ログの出力形式 型:文字列 初期値:時刻・ロガー名・関数名・ログレベル・メッセージ log_date_format 概要:ログの時刻の表示形式 型:文字列 初期値:年・月・日・時・分・秒 logger_name 概要:ロガー名 型:文字列 初期値:Unknown logger_level 概要:ロガーの出力レベル 型:整数 初期値:全て出力
サンプルコード
from UsamaAliceWhite import GetLogger logger = GetLogger(logger_name= name) logger.info("LogMessage")
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file usamaalicewhite-0.0.0.tar.gz.
File metadata
- Download URL: usamaalicewhite-0.0.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8816bc1dd70aacd9327bc63b2b82b89c992f093c85f57f731582eea2fa7ac544
|
|
| MD5 |
18ba31e58c721aeee87def9c6ac807f6
|
|
| BLAKE2b-256 |
b561bb21a3d13a80c2d79caf08e413aff48b1810851ee9965ec991eee697124c
|
File details
Details for the file usamaalicewhite-0.0.0-py3-none-any.whl.
File metadata
- Download URL: usamaalicewhite-0.0.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
589bc831f5af5132c03a501001d17a8a09dd760da4f2ac9960852dc8d7011f5f
|
|
| MD5 |
e28c11f84f5bb843c8010504e7101aa1
|
|
| BLAKE2b-256 |
dd6224cd1b6c52f2c6a7f99de98d19c422228dc6d5c788bb529f80360fa69f09
|