Hi, I understand this thread is referring to “Basically just add an io field to Context, thread the Context object through a more functions, and make the display stuff use the io field by default.” However, would it be possible to include here the code snippet that is doing this, I mean that is printing the output of Pkg.status()
to a text file?
My logging to txt file setup currently:
using Logging
# Open a textfile for writing
io = open("log.txt", "w+")
IOStream("file log.txt")
# Create a simple logger
logger = SimpleLogger(io)
# Set the global logger to logger
global_logger(logger)
# Example of command output printed to log.txt
@info "Sys.CPU_NAME" Sys.CPU_NAME
# Close the file
close(io)
I understand that to reproduce the environment its better to use Project.toml
and Manifest.toml
files, however, I am doing some benchmarks and my purpose is just to note the version of packages, thus printing the output of Pkg.status()
would be useful. And when trying @info Pkg.status()
I am receiving nothing
, thus this question.
EDIT: I think I got it:
Pkg.status(; io)