# The main repository of Praxis_Bot can be found at: . # Copyright (C) 2021 # Author Info Examples: # Name / Email / Website # Twitter / Twitch / Youtube # Authors: # Alex Orid / inquiries@thecuriousnerd.com / TheCuriousNerd.com # Twitter: @TheCuriousNerd / Twitch: TheCuriousNerd / Youtube: thecuriousnerd / Github: TheCuriousNerd # 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 . import logging import utilities_script class praxis_logger(): def init(self, name): super().__init__() self.logName = "logs/" + name + ".log" utilities_script.get_dir("logs") logging.basicConfig(filename=self.logName, level=logging.DEBUG) logging.info('Application running!') def log(self, msg): print(self.logName, msg) logging.info(msg)