Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where does standard output go? #8

Open
pakoito opened this issue Jun 13, 2013 · 1 comment
Open

Where does standard output go? #8

pakoito opened this issue Jun 13, 2013 · 1 comment

Comments

@pakoito
Copy link

pakoito commented Jun 13, 2013

For some reason I cannot find the standard output for my scripts, as it doesn't go to logcat or Android console. I'm loading them from files in programming time and executing a simple print("hello") every second, PC does it correctly but it's lost on Android. If I try other methods that would affect my application they are executed correctly so I know the scripts are being loaded.

@liuyanghejerry
Copy link

If you're using safeEvalLua or evalLua, then output should be in the return value, which is a String.
eg:
String result = xxx.safeEvalLua("print(\"Hello, world!\")"); // result should be "Hello, world!"

Reposting this result to logcat should be very easy. Just use System.out.println

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants