Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

where do console messages go?

Featured Replies

What does ScriptMaster do with console messages? Like the one produced by this:

System.out.print("Hello World")

Is there any way to capture that output? I want to use some open source code that has many calls to System.out.print, so just not using that statement isn't an option in this scenario.

That is just a "print" message. The output from that statement is "Hello World." If you want to capture and use what is being written you should handle it from within your class and present it to users through some other means such as a dialog box rather than passing it to a System.out.print(). The log messages appear in either the java console, apple console, terminal, or the command prompt window if you execute your program from terminal/command prompt. You should not use this command to present information to your users.

  • Author

What I was trying to find out is if there is any way to redirect what is sent to System.out.* so that I can use it in a manner that works in the ScripMaster plug-in environment.

I don't use that statement in my plug-in code, but I'm trying to utilize someone else's code that does.

You can return it as a result of your scriptmaster module and then display it in a filemaker text field or create a dialog box through java code that displays the message.

Dan

If you do

println "something"




in Groovy that is the same thing



It means you can test things out using the Groovy console to check results etc...



Depends why it is there in the code in the first place

If you create a variable than you can collect errors along the way then do 





If ( var != "") {

return var

} else {

return true

}

which will give you the output to the result of the Groovy Script

so in FM

$result = SomeSmFunction(params)

If $result <> "1"

then display it in a FM dialogue box

Also

http://stackoverflow.com/questions/121665/how-to-pipe-stdout-from-a-groovy-method-into-a-string

  • 2 years later...

That is just a "print" message. The output from that statement is "Hello World." If you want to capture and use what is being written you should handle it from within your class and present it to users through some other means such as a dialog box rather than passing it to a System.out.print(). The log messages appear in either the java console, apple console, terminal, or the command prompt window if you execute your program from terminal/command prompt. You should not use this command to present information to your users.

No, really: how does one get just a "print" message to work from a ScriptMaster script? Would like to use it for debugging. Returning as a result is impractical.

 

Can you be more specific about where FMP-Client ScriptMaster log messages appear (under what circumstances), and, specifically, how to redirect them to, say, a log file easily visible in the Console.app?

 

TIA...

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.