Socket
Socket
Sign inDemoInstall

ZypUtility

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ZypUtility

zyputility contains readconfig & log


Maintainers
1

Readme

des:这是zhangyp自己的公用包,目前包含两个公用库ReadConfig(读取配置文件)、ZypLog(log类) --ReadConfig ----读取配置文件,将配置文件信息转化成dict的形式,引用说明C = conf(),C['配置文件参数名']

--ZypLog ----将日志输出到控制台和保存在文件,设置如下 ----def init(self, filename, level='info', when='D', back_count=3, fmt='''[时间]:%(asctime)s [线程]:%(thread)s [级别]:%(levelname)s [路径]:%(pathname)s [函数]:%(funcName)s [行号]:%(lineno)d [信息]:%(message)s

'''): """ :param filename: log名 :param level: bug等级 :param when: 时间间隔单位 S 秒、M 分、H 小时、D 天、W 星期、midnight 每天凌晨 :param back_count: log保留个数,如果超过这个个数,就会自动删除, :param fmt: log格式化 """ ----如此引用 Logger('filename',level='info', when='D', back_count=3)

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc