OXIESEC PANEL
- Current Dir:
/
/
snap
/
core
/
17210
/
usr
/
lib
/
python3
/
dist-packages
/
probert
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
10/02/2024 07:52:55 PM
rwxr-xr-x
📄
__init__.py
731 bytes
11/08/2016 11:35:29 PM
rw-r--r--
📁
__pycache__
-
10/02/2024 07:52:55 PM
rwxr-xr-x
📄
_nl80211.cpython-35m-x86_64-linux-gnu.so
23.2 KB
02/17/2017 02:26:30 AM
rw-r--r--
📄
_nl80211module.c
18.07 KB
11/08/2016 11:35:29 PM
rw-r--r--
📄
_rtnetlink.cpython-35m-x86_64-linux-gnu.so
19.11 KB
02/17/2017 02:26:30 AM
rw-r--r--
📄
_rtnetlinkmodule.c
10.13 KB
02/17/2017 01:05:06 AM
rw-r--r--
📄
log.py
1.44 KB
07/27/2016 11:12:20 AM
rw-r--r--
📄
network.py
15.57 KB
02/17/2017 01:05:06 AM
rw-r--r--
📄
prober.py
2 KB
12/21/2016 09:06:10 PM
rw-r--r--
📄
storage.py
5.51 KB
11/21/2016 01:43:53 AM
rw-r--r--
📁
tests
-
10/02/2024 07:52:55 PM
rwxr-xr-x
📄
utils.py
7.86 KB
12/21/2016 09:06:10 PM
rw-r--r--
Editing: log.py
Close
# 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