8.2.34 | Linux | www-data (uid:33)
👁 View: log.py
📁 //snap/core20/2866/usr/lib/python3/dist-packages/probert/log.py
# Copyright 2015 Canonical, Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. import logging import os from logging.handlers import TimedRotatingFileHandler def setup_logger(name=__name__): LOGDIR = "logs" LOGFILE = os.path.join(LOGDIR, "debug.log") if not os.path.isdir(LOGDIR): os.makedirs(LOGDIR) log = TimedRotatingFileHandler(LOGFILE, when='D', interval=1, backupCount=7) log.setLevel('DEBUG') log.setFormatter(logging.Formatter( "%(asctime)s " "%(name)s:%(lineno)d %(message)s", datefmt='%m/%d %H:%M')) log_filter = logging.Filter(name='probert') log.addFilter(log_filter) logger = logging.getLogger('') logger.setLevel('DEBUG') logger.addHandler(log) return logger
← Back
💻 Terminal
📤 Upload
📂
Click or Drag & Drop
📁 //snap/core20/2866/usr/lib/python3/dist-packages/probert
NameSizePermModifiedActions
📁 __pycache__/-07552026-04-10 12:14🗑 Delete
📁 tests/-07552026-04-10 12:14🗑 Delete
__init__.py731B06442020-08-04 15:14👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
_nl80211.cpython-38-x86_64-linux-gnu.so27.4K06442020-08-04 15:30👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
_nl80211module.c18.1K06442020-08-04 15:14👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
_rtnetlink.cpython-38-x86_64-linux-gnu.so23.3K06442020-08-04 15:30👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
_rtnetlinkmodule.c13K06442020-08-04 15:14👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
log.py1.4K06442020-08-04 15:14👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
network.py26.8K06442020-08-04 15:14👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
prober.py1.2K06442020-08-04 15:14👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
utils.py8.6K06442020-08-04 15:14👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del