Logging is one of the things that’s extremely important to do well, especially in the (micro)services and functions world where you have to track what’s happening across hundreds of services and functions.
In this post, I’ll briefly look at how to collect logs from your Fn functions and send them to an external log aggregator (in our case, this will be Papertrail).
· Fn CLI
· Fn Server (you can use
fn start command to bring up a local server)
Create a Simple Go Function
Start by creating a new function with the Fn CLI (fn init --runtime go myfunc). I have added two log statements — hello and goodbye — to the function as shown below:
Boilerplate Fn function with two logging statements added
Let’s deploy and call this function like this: Read the complete article here.
For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.