The SAS Python Logger Handler allows use the python logger system to send logging streams to SAS System logger
Project description
SAS Python Logger Handler
Jan 2023
Alfredo Lorie Bernardo
version 0.2.0
Introduction
The SASHandler allows to send python logging streams to SAS System logger when using the SAS PROC PYTHON.
The SAS PROC PYTHON procedure enables you to run statements from the Python programming language within SAS code. You can submit Python statements from an external Python script or enter Python statements directly.
Download
GitHub: https://github.com/a24lorie/sas-pylogger-handler
Using SASHandler
import logging
from logging import Handler
from sas_handler import SASHandler
handler = SASHandler(sas=SAS)
handler.setLevel(logging.ERROR)
logger: logging.Logger = logging.getLogger()
logger.setLevel(logging.WARN)
logger.addHandler(handler)
logger.error("This is an error message") # This log message will be shown
logger.debug("This is a debug message") # This log message won't be shown
Contributing
This library welcomes contributors from all developers, regardless of your experience or programming background. If you find a bug, send a pull request and we'll discuss things. If you are not familiar with "pull request" term I recommend reading the following article for better understanding We value kind communication and building a productive, friendly environment for maximum collaboration and fun.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file sas-pylogger-handler-0.2.0.tar.gz
.
File metadata
- Download URL: sas-pylogger-handler-0.2.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08ec842e99eb9de29da8ba0b68d95821c1bd12ce074b135063bee92a05cde11e |
|
MD5 | ef9093217b31dd5a19ac356f40dc8f98 |
|
BLAKE2b-256 | 259b2a5ac66d1bf5d9ae62a50e29c8e8844f4d1158348acaee6623a0e9e57bb2 |