Metadata-Version: 1.1
Name: SimpleLogger
Version: 1.4.9
Summary: Simple Logging Utility
Home-page: https://github.com/tamul/simplelogger
Author: Tayler Mulligan
Author-email: mulligantayler@gmail.com
License: GNU GPL v3
Description: ('=============\nSimpleLogger\n=============\n\nSimpleLogger is a simple logging utility for Python. I find the default Python logging module powerful, but extremely clunky and difficult to setup quickly. SimpleLogger supports basics such as output redirection, custom logging format, and logging levels.\n\nUsage:\n======\nLog Levels and Threshold:\n--------------------------\nThe current threshold that determines what level of log entries can be seen is set through ``Logger.set_threshold``, passing a constant as the argument. Level constants include DEBUG, INFO, WARNING, ERROR, and CRITICAL. Changing the threshold only affects future entries.\n\nLogging Formats:\n----------------\nLogging formats are set through ``Logger.set_format``, passing a string of valid characters and substitution directives as arguments.\n\nValid subsitution directives include:\n\n+------------+-----------------------------+\n|  Directive | Substitution                |\n+============+=============================+\n| {time}     | The current time            |\n+------------+-----------------------------+\n| {datetime} | The current date and time   |\n+------------+-----------------------------+\n| {date}     | The current date            |\n+------------+-----------------------------+\n| {level}    | The level of the entry      |\n+------------+-----------------------------+\n| {text}     | The text to be logged       |\n+------------+-----------------------------+\n\nInstallation:\n=============\n**Recommended:** ::\n\n    pip install simplelogger\n\n**The Hard Way:** ::\n\n    python setup.py install\n\n\nExamples:\n=========\n**Basic usage:**::\n\n    import simplelogger\n\n    # make a new logger that outputs to output_file.log, has a threshold of DEBUG, and the entry format is just the text to be logged\n    logger = simplelogger.Logger(stream=output_file.log, threshold=simplelogger.DEBUG, format="{text}")\n\n    logger.info("Log at the info level")\n    logger.warning("Log at the warning level")\n\n    if (foo > bar):\n        # change the logging threshold to INFO\n        logger.set_threshold(simplelogger.INFO)\n    else:\n        # change the format to output the logged text, the date and time, and the time separated by characters\n        logger.set_format("{text}: {datetime} - {time}")\n\nLicense\n-------\nCopyright (C) 2013  Tayler Mulligan\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see <http://www.gnu.org/licenses/>.\n',)
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
