Created
May 21, 2020 05:05
-
-
Save h4ndzdatm0ld/7e98569ee524f91161119b2522890f06 to your computer and use it in GitHub Desktop.
Logging netmiko
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def netmiko_logging(): | |
''' Netmiko Logging - This creates a Log file (NetmikoLog.txt) under a new 'Logging' folder.. Does not overwrite (a+). | |
Log must end in .txt file as the program won't allow two .log files in the CWD. | |
''' | |
create_folder('Logging') | |
open('Logging/NetmikoLog.txt', 'a+') | |
logging.basicConfig(filename='Logging/NetmikoLog.txt', level=logging.DEBUG) | |
logger = logging.getLogger("netmiko") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment