Skip to content

saspy options for logging #534

Discussion options

You must be logged in to vote

Right, you can't redirect the log out from under saspy, it needs the log to function correctly. SASPy stores the SASLOG for the whole session; all the code you run, not just one submit. You can access the log at any point with the sas.saslog() method, which returns the whole log, up to that point. So If you want to write the log to a file when you're done with your session, just do that:

import saspy
sas = saspy.SASsesion()

sas. ...    all the code you want to run

fd = open('out.log','w')
fd.write(sas.saslog())
fd.close()
sas.endsas()

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@FibonacciTrees
Comment options

@tomweber-sas
Comment options

Answer selected by FibonacciTrees
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants