You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The emulator currently supports logging the output of each NES instruction to stdout, and also to a file. But, the only way to currently do this is to manually alter the code.
There are two functions in main.go
The RunInstruction function takes an instruction and a boolean as arguments, where the boolean defines whether or not to log to stdout.
The initLogOutput() function pipes stdout to a log file.
We should create command line options like --log to pipe instruction output to stdout, and --logfile asdf.log for piping the logs to a file.
The emulator currently supports logging the output of each NES instruction to stdout, and also to a file. But, the only way to currently do this is to manually alter the code.
There are two functions in
main.go
The
RunInstruction
function takes an instruction and a boolean as arguments, where the boolean defines whether or not to log to stdout.The
initLogOutput()
function pipes stdout to a log file.We should create command line options like
--log
to pipe instruction output to stdout, and--logfile asdf.log
for piping the logs to a file.Golang provides a simple command line argument parsing package
flag
.https://gobyexample.com/command-line-flags
The text was updated successfully, but these errors were encountered: